read text file byte by byte

Tim Chase python.list at tim.thechases.com
Sun Dec 13 09:42:26 EST 2009


Grant Edwards wrote:
>>> If it's a binary file...
>> OK, but... what is a "binary" file?
> 
> One containing data encoded in base-2.

Or one of a system of two files that orbits around a common 
center of mass?  So if you see two files orbiting around a 
cathedral, they're binary files.

f.open('binaryfile.bin', 'wb')
f.write(data.encode('binary'))
f.close()

  :-)

-tkc







More information about the Python-list mailing list