Cannot create a new file

Peter Hansen peter at engcorp.com
Mon Jun 21 20:57:13 EDT 2004


Eric Belanger wrote:

> Ive created a little script which, at the end of it, deals with copying 
> two files. All the script works fine except when its at the copy 
> line(s). Nothing gets copied, it crashes at the first open() line.
> 
> Before using open() I made it the lazy way first and wrote system("cp 
> "+file1+" "+file2), but gaves me that message:
> 
> IOError: [Errno 2] No such file or directory: 
> '/home/bilange/.hnb-backup/1087861694'

Could you please include the full traceback, cut and pasted from
the console, so that we can see the parts just before what you
show above?

Also it would probably be a good idea to include a code snippet
showing the previous ten-or-so commands just before the failing
line.

-Peter



More information about the Python-list mailing list