#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    37
    Rep Power
    11

    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
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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

  4. #3
  5. onCsdfeu
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Canada
    Posts
    100
    Rep Power
    12
    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...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    37
    Rep Power
    11
    thanks.. was able to run python.exe
    then
    python script.py
  8. #5
  9. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    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

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula

  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    37
    Rep Power
    11
    ActiveState python?
    where can i dl it?
  14. #8
  15. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    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.
    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

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  16. #9
  17. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    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

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  18. #10
  19. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo