ho********@hotmail.com (hokiegal99) wrote in message news:<93**************************@posting.google. com>...
I installed Python-2.3 into c:\Program Files\Python23 on a new W2K SP4
computer. When I write a Python script and run it from the command
prompt, I get the following error:
C:\>python 'name-of-script.py'
'python' is not recognized as an internal or external command,
operable program or batch file.
Here's what my path contains:
C:\>path
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\ Wbem;"C:\Program
Files\Norton
SystemWorks\Norton Ghost\";C:\Program Files\SSH Communications
Security\SSH Secu
re Shell
Any ideas? I've reinstalled and rebooted several times. Also tried
adding c:\Program Files\Python23 to my path... still get the error.
Just a thought, but the SUBST command still works in Win2K.
C:\>subst /?
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path]
Substitute drive letter "P" for C:\Program Files\python23. Then, add
P:\ to your path.
Benefits? No nasty spaces, a much shorter path, and quick access to
the Python directory when you're at the command line (just type "P:").
(To be fair, assigning P: to c:\Program Files, and adding P:\python23
to your path, is probably an idea with more mileage in it.)
I haven't used this specifically myself (I install python in
c:\python##), but I have often SUBST'd the drive letter S: for
\python##\lib\site-packages when I'm studying the code of a
recently-installed package. Much easier to pop open an editor window,
or a Explorer window, to "S:\somepackage" than its longer counterpart.
It might be quite fun to go SUBST-happy and transform all those lonely
unassigned drive letters into contributing members of society. Perhaps
U: could map to c:\Documents and Settings, W: could map to %WINDIR%,
X: to the folder where you hide your illicitly-gained MP3's...
It would be best to do the SUBST before login or service startup. I
*think* you can still use an autoexec.bat file in Win2K, but there's a
formal "startup script" approach that is blessed by Microsoft. Search
MS support for "How to Run a Batch File Before Logging on to Your
Computer".
Hope it helps.
-- Graham