Reading binary files

Albert Hopkins marduk at
Mon Aug 24 16:43:59 CEST 2009

On Mon, 2009-08-24 at 10:35 -0400, Ronn Ross wrote:
> I need to read a binary file. When I open it up in a text editor it is
> just junk. Does Python have a class to help with this? 

Yes, the "file" class.

>>> myfile = open('/path/to/binary/file', 'rb')


More information about the Python-list mailing list