[Tutor] Python from WINNT command line question

stuart_clemons@us.ibm.com stuart_clemons@us.ibm.com
Tue, 28 May 2002 11:08:53 -0400


--0__=0ABBE154DFC1D3F68f9e8a93df938690918c0ABBE154DFC1D3F6
Content-type: text/plain; charset=US-ASCII


Hi:

Python 2.2 is installed in f:\ptython22, as are my .py program files.  I
can run my programs with no problem from the f:\python22 directory.

However, when I try to run them from another drive\directory, I get a
"can't open file foo.py" error.

I tried setting the path and PYTHONPATH environment as shown below.

What do I need to do to make this work ?   Thanks,


E:\WINNT4>path
PATH=f:\python22;f:\python22\lib

E:\WINNT4>set PYTHONPATH
PYTHONPATH=f:\python22\lib

E:\WINNT4>f:\python22\python foo.py

f:\python22\python: can't open file 'foo.py'

E:\WINNT4>
--0__=0ABBE154DFC1D3F68f9e8a93df938690918c0ABBE154DFC1D3F6
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline

<html><body>
<p>Hi:<br>
<br>
Python 2.2 is installed in f:\ptython22, as are my .py program files.  I can run my programs with no problem from the f:\python22 directory.<br>
<br>
However, when I try to run them from another drive\directory, I get a &quot;can't open file foo.py&quot; error.  <br>
<br>
I tried setting the path and PYTHONPATH environment as shown below. <br>
<br>
What do I need to do to make this work ?   Thanks,<br>
<br>
<br>
E:\WINNT4&gt;path<br>
PATH=f:\python22;f:\python22\lib<br>
<br>
E:\WINNT4&gt;set PYTHONPATH<br>
PYTHONPATH=f:\python22\lib<br>
<br>
E:\WINNT4&gt;f:\python22\python foo.py<br>
<br>
f:\python22\python: can't open file 'foo.py'<br>
<br>
E:\WINNT4&gt;</body></html>
--0__=0ABBE154DFC1D3F68f9e8a93df938690918c0ABBE154DFC1D3F6--