python 2.5 - f=open('a_file.txt','w') gives [Errno 2]

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Tue Dec 4 17:24:57 EST 2007


dirkheld a écrit :
>>How exactly are you starting the Python interpreter?  "No such file or
>>directory" on file creation can happen when you try to create a file
>>in a directory that has ceased to exist:
> 
> 
> Damn...now it's time to be ashamed. Because of my new installation of
> leopard I used another computername. So the path were I wanted to
> write to didn't exist any more.
> 
> Previous : /users/dirkheld/programming/python/....
> Now : /users/dirk/programming/python/...

which should remind everybody that hard-coding a path is a bad idea !-)

> Sorry for keeping you guys busy with such a mistake ;)



More information about the Python-list mailing list