Python has a built-in function, open, for opening a file on disk. open returns a file object, which has methods and attributes for getting information about and manipulating the opened file.
f = open("/music/_singles/kairo.mp3", "rb")
f.tell() #tell method of a file object tells you your current position in the open file.
f.seek(-128, 2) # The seek method of a file object moves to another position in the open file.
The second parameter specifies what the first one means;
0 means move to an absolute position (counting from the start of the file),
1 means move to a relative position (counting from the current position), and
2 means move to a position relative to the end of the file.
The read method reads a specified number of bytes from the open file and returns a string with the data that was read.
tagData = f.read(128)