Writing binary files in windows

Abhishek Gulyani stirredo at gmail.com
Fri Feb 11 22:20:26 EST 2011

When I write binary files in windows:

file  = open(r'D:\Data.bin','wb')
file.write('Random text')

and then open the file it just shows up as normal text. There is nothing
binary about it. Why is that?

Sorry if this is too much of a noobie question. I tried googling around but
couldn't find an answer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110212/6f82dd62/attachment.html>

More information about the Python-list mailing list