trace.py cannot find script after reading from it?

Steve Holden sholden at holdenweb.com
Wed Feb 26 10:30:21 EST 2003


"Peter Hansen" <peter at engcorp.com> wrote in message
news:3E5CD67C.BED4A9DB at engcorp.com...
> Mathias Koerber wrote:
> >
> > I have a problem with trace.py and would like to find out what could be
> > the reason. Python is 2.1.1
> >
> > In short, trace.py seems to be able to open the script I specify on the
> > commandline but after importing paths it claims that that script file
> > does not exist!
> >
> > I have tried setting PYTHONPATH to ".", the full name of the
> > local directory etc without avail.
> >
> > Any help is appreciated.
> >
> > $ python trace.py --trace ./MK_add-members.py <args>
> > __main__(0): ??
> > __main__(1): ??
> > MK_add-members.py(0): main()
> > MK_add-members.py(87): """
> > MK_add-members.py(89): import sys
> > MK_add-members.py(90): import os
> > MK_add-members.py(91): import string
> > MK_add-members.py(92): import getopt
> > MK_add-members.py(93): import paths
> > ./MK_add-members.py: Cannot run file './MK_add-members.py' because: No
such
> > file or directory
> > #
>
> I don't know what's going wrong, but have you tried it without the
> leading "./" ?  Maybe it gets confused by that...
>

It also bears a strange resemblance to the situation where the Python
interpreter can't be located because of a trailing carriage return on the #!
line. Does the file contain "\r" characters?

Surely a vexing and puzzling symptom. Please let us know what it is when you
find out!

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list