[Tutor] Error writing to file...

ALAN GAULD alan.gauld at btinternet.com
Sat Dec 26 12:25:12 CET 2009

> The docs say
> "write( str) - Write a string to the file."
> Only a string. Regardless of mode. 
> Mode mostly affects interpretation of line ends.

Thats true of course, you need to encode the binary 
data with struct to write it as binary.

Alan G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091226/f0a5fb3f/attachment.htm>

More information about the Tutor mailing list