Newbie question

Ian Hobson ian.hobson at
Wed Sep 27 21:14:31 CEST 2000

In article <mailman.969978040.18770.python-list at>, David
Porter <jcm at> writes
>* Prospero <prospero at>:
>> I have installed the 1.5.2 version and done the tests mentioned in the docs,
>> i.e. one-line programs, all of which work fine. Then, following the advice
>> of the Non-programmers Tutorial for Python, I saved and tried to run the
>> simple "Hello World" program from DOS. I got "Bad command or filename". Then
>> I tried adding the path to my autoexec.bat but could not find a form
>> acceptable to my machine. There is already a path there, which reads "path
>> C:\JDK1.3\BIN", and leads to my Java kit.
>> Can somebody suggest a viable addition to this?
>I believe that you need to add the path to python.exe. I would guess that it
>is c:\python1.5, but you should find out yourself where it is.
>try a line something like this in your autoexec.bat, and then reboot after
>saving it.

IMHO A better solution (assuming it is windows the original poster is
using) is to get PythonWin.

Not only does this explain this problem well in the docs, it provides a
registry edit option to fix it safely and cleanly. 

Besides - its a great little development tool. 
>Note that you should be able to double-click *.py scripts as if they were
>executables. You will probably notice that the dos window will close before
>you get a chance to read the output though. One way around this, is to add
>this line to the end of your python scripts which have output that you want
>to read:
>raw_input("Press ENTER. ")
This fails when you get a walk back. Just when you want to check what
has gone wrong....... grrrrr!

Ian Hobson 

Every time we teach a child something, we prevent him from inventing 
it himself. - Jean Piaget

More information about the Python-list mailing list