Reading from a binary file in a portable way

jb egrossde at yahoo.de
Thu Apr 18 02:35:12 EDT 2002


I should like to read a (binary) file x.y in a buffer and then do things 
like getting the 16 bit integer that is at the offset n, n+1 in the file 
(maybe lowbyte, then higyhbyte.

Previously I did it only under MS-Windows where for example I could open the 
file with the flag O_BINARY but this is no longer possible under Linux.

What would a solution that works under both Unix and MS-Windows look like?

-- 
Janos Blazi


-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----



More information about the Python-list mailing list