[Tutor] re: Python from WINNT command line question
stuart_clemons@us.ibm.com
stuart_clemons@us.ibm.com
Tue, 28 May 2002 11:52:07 -0400
--0__=0ABBE154DFC5671A8f9e8a93df938690918c0ABBE154DFC5671A
Content-type: text/plain; charset=US-ASCII
Hi all:
I think figured out my solution.
While this didn't work:
E:\WINNT4>f:\python22\python foo.py
f:\python22\python: can't open file 'foo.py'
This worked (though I'm not sure why):
E:\WINNT4>f:\python22\foo.py
- Stuart
---------------------- Forwarded by Stuart Clemons/Westford/IBM on
05/28/2002 12:03 PM ---------------------------
Stuart Clemons
05/28/2002 11:08 AM
To: tutor@python.org
cc:
Subject: Python from WINNT command line question
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__=0ABBE154DFC5671A8f9e8a93df938690918c0ABBE154DFC5671A
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline
<html><body>
<p>Hi all:<br>
<br>
I think figured out my solution.<br>
<br>
While this didn't work:<br>
<br>
E:\WINNT4>f:\python22\python foo.py<br>
<br>
f:\python22\python: can't open file 'foo.py'<br>
<br>
This worked (though I'm not sure why):<br>
<br>
E:\WINNT4>f:\python22\foo.py<br>
<br>
- Stuart<br>
<br>
<font color="#800080">----------------------</font><font size="2" color="#800080"> Forwarded by Stuart Clemons/Westford/IBM on 05/28/2002 12:03 PM </font><font color="#800080">---------------------------</font><br>
<p><font size="2" color="#800080">To: </font><font size="2">tutor@python.org</font><br>
<font size="2" color="#800080">cc: </font><br>
<font size="2" color="#800080">Subject: </font><font size="2">Python from WINNT command line question</font><br>
<br>
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 "can't open file foo.py" 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>path<br>
PATH=f:\python22;f:\python22\lib<br>
<br>
E:\WINNT4>set PYTHONPATH<br>
PYTHONPATH=f:\python22\lib<br>
<br>
E:\WINNT4>f:\python22\python foo.py<br>
<br>
f:\python22\python: can't open file 'foo.py'<br>
<br>
E:\WINNT4><br>
<br>
</body></html>
--0__=0ABBE154DFC5671A8f9e8a93df938690918c0ABBE154DFC5671A--