why i cannot invoke python script using command line?

John Gordon gordon at panix.com
Tue Aug 23 10:21:29 EDT 2011


In <mailman.350.1314108212.27778.python-list at python.org> smith jack <thinke365 at gmail.com> writes:

> but i can invoke it in eclipse, what's wrong?
> the script refered to another python script in eclipse project.

> f:\project\src\a.py
> f:\project\src\lib\b.py

> there is such lines in a.py
> from lib import b

> i can invoke a.py very well in eclipse

> but failed when using python f:\project\src\a.py, what's wrong?
> (the error msg shows a.py cannot find b.py) , what should i do in
> order to run a.py using command line?

What is your PYTHONPATH environment variable setting?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list