File-writing not working in Windows?

jay graves jaywgraves at
Fri Jun 6 20:58:03 CEST 2008

On Jun 6, 1:22 pm, tda... at wrote:
> I am thinking that the ", 'a')" command is the
> issue.  Is there anything different about opening a file in Windows?
> Does Windows understand "append", or would I have to do control checks
> for seeing if the file is created and then appending?

Does your file have embedded nulls?
Try opening it in binary mode.,'ab')

Note that this will turn off Universal newline support.

Barring that, can you distill the problem down by writing a script
that exhibits the behavior without the rest of your program?


More information about the Python-list mailing list