Reading from a binary file in a portable way

Grant Edwards grante at visi.com
Thu Apr 18 06:57:25 EDT 2002


On Thu, 18 Apr 2002 09:28:37 +0200, jb <egrossde at yahoo.de> wrote:
>> Why can't you open the file in binary mode under Linux/UNIX?
>> 
>> You may also find the 'struct' module useful.
>
>I used os.open under MS-WIN with the flag O_BINARY and this is not supported 
>under Linux.

Use the built-in open() with the "b" flag.

-- 
Grant




More information about the Python-list mailing list