Newbie Question re Python 2.2.2 WIN

a a at b.c
Mon Jun 9 08:59:07 EDT 2003


Ben Minton <pythonidae_olivaceous at hotmail.com> wrote in
news:Xns9395748B5A2D0pythonidaeunderscore at 203.220.9.230: 

> a <a at b.c> wrote in news:Xns9394A8AABA933abc at 194.106.32.13:
> 
>> http://www.ibiblio.org/obp/thinkCSpy/
>> 
> 
> thanks sfb ... i thought that might be the case, but wasn't sure. 
> at the python shell .... with the >>> what is the command to bring run
> an python script, say my_first_script.py?

I don't know that there is one, usually you run a script from the 
operating system with;
c:\> python my_first_script.py

(Get to the command prompt with Start -> run -> cmd.exe )

> Is there another way, perhaps just going into the folder where the
> scripts are stored and clinking on the file name while, the python
> engine is running?

If you double-click on a blah.py file in Windows, it should be set up to 
run with Python (whether it is already running or not). If this doesn't 
work by default, then choose "Open With" and "c:\python22\python.exe" (or 
use wherever you installed Python). This will work but the script will 
usually run and finish too fast to see anything useful. Try adding 
something like;

ignored_response = raw_input("Press any key to continue...")

to the end of your script to get a readable output.

- sfb.





More information about the Python-list mailing list