The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
how to run.py script
Discuss how to run.py script in the Python Programming forum on Dev Shed. how to run.py script Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 4th, 2004, 11:14 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 37
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
|
how to run.py script
new to python but already have webserver and python installed (Foxserv) which i believe python is installed properly.
c:/foxserv/pthon
im using window xp and i have .py script i want to run
how do i run this script?
thanks 
|

January 5th, 2004, 11:04 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
I've never used Foxserv so i have no idea how you run the script from there but i guess you just access the Python script like any other page?
Usually if you want to run a Python program on windows all you have to do is double click the file. Or do something like..
C:\Python23\> python path\to\python\script.py
Hope this helps,
Mark.
__________________
programming language development: www.netytan.com – Hula
|

January 5th, 2004, 11:19 AM
|
 |
onCsdfeu
|
|
Join Date: Jul 2003
Location: Canada
Posts: 100
Time spent in forums: 2 h 16 m 21 sec
Reputation Power: 10
|
|
|
Also, on Windows, I strongly suggest you add Python to your PATH global variable or else you'll be typing C:\python23\python script.py over and over...
|

January 9th, 2004, 03:53 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 37
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
|
thanks.. was able to run python.exe
then
python script.py
|

January 9th, 2004, 04:34 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Don't know much about FoxServ, but if you install ActiveState python, the installer associates files with .py extension to the python.exe program. Thus, all you need to do is double click on the file (in windows 2k (and possibly others), you can simply type the filename as is (i.e.) foo.py and the command shell knows to call the associated application)
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|

January 9th, 2004, 04:44 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Not just ActivePython scorpy, the core distribution should also associate .py, .pyw, .pyc and .pyo files with python so double clicking should be pretty standard for windows user.
Infact i believe it askes you if you want to associate these file types with Python when you run the installer  . Not that its hard to set this up manually anyway
Ah well, take care guys.
Mark.
|

January 9th, 2004, 04:49 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 37
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
|
ActiveState python?
where can i dl it?
|

January 9th, 2004, 04:49 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Yep, I should have said that the Installer asks you (Incidentally, I declined to do the association when I first installed it on Windows) rather than doing it automatically. Good to know that it is part of the core distribution, rather than an ActivePython addon.
|

January 9th, 2004, 04:50 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|

January 9th, 2004, 05:28 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Nothing wrong with ActivePython, defiantly a good choice if your developing on windows since it comes with some very third-party modules built-in, including win32all!
However ActivePython always seem to be one step behind the core Python distribution i.e I'm running Python 2.3.3 and have been for a while now where ActivePython is only available up to 2.3.2... Just something you should note
Mark.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|