[Tutor] how to simply run a .py file
Francis.Moore at shaws.co.uk
Wed Jul 21 16:00:30 CEST 2004
From: Heslot Francois [mailto:heslot at lpa.ens.fr]
> I simply would like to run a .py program that I downloaded
Imagine that your Python installation directory is
C:\Python24. And your .py file resides in C:\Temp and
is called Test.py.
Go to the command line on your OS.
At the command prompt type
$ C:\Python24\Python.exe C:\Temp\Test.py
This is the longhand way of doing it.
A shorter way is to add Python to your environment path.
Then you can shorten the command to:
$ Python C:\Temp\Test.py
An even shorter way is to set default to C:\Temp. Then
the command becomes:
$ Python Test.py
Hope this helps,
This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any distribution, copying or use of this communication or the information in it is strictly prohibited. If you have received this communication in error please notify us by e-mail or by telephone (+44(0) 1322 621100) and then delete the e-mail and any copies of it.
This communication is from Shaw & Sons Limited whose registered office is at Shaway House, 21 Bourne Park, Bourne Road, Crayford, Kent DA1 4BZ. The views expressed in this communication may not be the views held by Shaw & Sons Limited.
This message has been checked for all known viruses by McAfee VirusScan.
More information about the Tutor