I have a huge binary file from which I want to read several bytes from the exact positions in the file. How can I access specific bytes from a binary file without linking all bytes from the beginning of the file? Thanx,
Make sure you open the file with the attribute "b" (for example: file("myfile.bin", "rb") ). Then use the seek() method for the file object.
file("myfile.bin", "rb")
seek()
Have a look here: http://docs.python.org/release/2.4.4/lib/bltin-file-objects.html