Newbie question

David Porter jcm at bigskytel.com
Tue Sep 26 10:19:09 EDT 2000


* Prospero <prospero at bigwig.net>:
> 
> 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.

set PATH=C:\PYTHON1.5;%PATH%

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. ")


  David
  




More information about the Python-list mailing list