Script can't find input file despite being in the same directory
Robocop
bthayre at physics.ucsd.edu
Fri Oct 17 13:34:16 EDT 2008
More information about the Python-list mailing list
Fri Oct 17 13:34:16 EDT 2008
- Previous message (by thread): Script can't find input file despite being in the same directory
- Next message (by thread): Script can't find input file despite being in the same directory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Oct 17, 10:27 am, "Chris Rebert" <creb... at ucsd.edu> wrote: > On Fri, Oct 17, 2008 at 10:07 AM, Robocop <btha... at physics.ucsd.edu> wrote: > > I have a simple little script that reads in postscript code, appends > > it, then writes it to a new postscript file. Everything worked fine a > > month ago, but after rearranging my directory tree a bit my script > > fails to find the base postscript file. > > > The line in question is: > > > for line in fileinput.input(['base.ps']): > > output.write(line) > > What directory is output if you insert the lines: > > from os import getcwd > print "CWD:", getcwd() > > just before the line is question? > > Cheers, > Chris > -- > Follow the path of the Iguana...http://rebertia.com > > > > > I'm kind of at a loss as the script is executing in the same directory > > as base.ps, yet it can't find it. I'm relatively new to python > > scripting, so i'm expecting it's just something i haven't learned > > about python that is causing the problem. Any suggestions would be > > greatly appreciated. > > -- > >http://mail.python.org/mailman/listinfo/python-list > > The output is /home/bruce/DEVadhc/attendance which is the directory i expected, and the directory that contains base.ps
- Previous message (by thread): Script can't find input file despite being in the same directory
- Next message (by thread): Script can't find input file despite being in the same directory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list