On Nov 7, 2:40 pm, Holger <[EMAIL PROTECTED]> wrote: > This is what it looks like in DOS: > ======================================= > C:\production>python > ActivePython 2.5.2.2 (ActiveState Software Inc.) based on > Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information.>>> b = > open('boot.bin').read() > >>> len(b) > 1067 > >>> import os > >>> os.path.getsize('boot.bin') > > 18308L > ======================================= > > What is wrong? / What am I doing wrong? > I would expect it to read the whole file.
Solution: open(<file>, 'rb') -- http://mail.python.org/mailman/listinfo/python-list