player.py: don't import fcntl until it's needed
core.compressLongInt: change to function, fix missing import struct
remove unused import struct