File-writing not working in Windows?

Ivan van.ni.po at gmail.com
Sat Jun 7 15:48:52 CEST 2008


John Machin ?????:
> On Jun 7, 1:18 am, tda... at gmail.com 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 http://www.python.org/dev/peps/pep-0008/
>
> HTH,
> John
>   
Hello,
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).

TBRDs,
Ivan




More information about the Python-list mailing list