File-writing not working in Windows?

Ivan at
Sat Jun 7 15:48:52 CEST 2008

John Machin ?????:
> On Jun 7, 1:18 am, tda... at wrote:
> Assume nothing. Don't believe anyone who says "always". Insert some
> print statements and repr() calls to show what's actually there.
>> I hope however that it's something obvious that a Python guru here
>> will be able to spot and that this n00b is missing!
> *IF* the problem is in the code, it would be easier to spot if you had
> removed large chunks of indentation before posting.
> Less is more: change "if (foo == 2):" to "if foo == 2:", "foo == True"
> to "foo", and "foo == False" to "not foo".
> Browse
> HTH,
> John
I tried os.path.join() under Windows XP and everything works as 
expected. The problem is in your script. You may use logger or use 
additional checks (John Machin wrote about this practice).


More information about the Python-list mailing list