Writing binary files in windows

Abhishek Gulyani stirredo at gmail.com
Sat Feb 12 04:20:26 CET 2011


When I write binary files in windows:

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

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