run a script and supply commands from a python cgi script

Discussion in 'Python' started by moishyyehuda@gmail.com, Dec 14, 2006.

  1. Guest

    Hi

    #1 How do I open a script from another script.
    #2 when I run the script how can I supply commands to the script.
    #3 how do I find the what commands the script needs.

    The thing is like this. I need to set up a module on my server, but i
    cant access the server with a comand line. So I want to run setup.py
    script (I nead to run setup.py to setup up the module) from a python
    cgi script, and supply commands from the script. So if any one can help
    me with this I would appreciate it.

    Moishy
    , Dec 14, 2006
    #1
    1. Advertising

  2. Larry Bates Guest

    wrote:
    > Hi
    >
    > #1 How do I open a script from another script.


    Use subprocess or popen

    > #2 when I run the script how can I supply commands to the script.


    See documentation on subprocess or popen

    > #3 how do I find the what commands the script needs.


    See documentation that comes with the script you wish to run

    >
    > The thing is like this. I need to set up a module on my server, but i
    > cant access the server with a comand line. So I want to run setup.py
    > script (I nead to run setup.py to setup up the module) from a python
    > cgi script, and supply commands from the script. So if any one can help
    > me with this I would appreciate it.
    >
    > Moishy
    >


    This is most likely not going to work. You aren't going to have adequate
    rights for the setup.py script to write to the places that it will need
    to write to. You probably need to switch to an ISP that allows you shell
    access to your server instance or one that will install python modules
    for you on your sever.

    -Larry Bates
    Larry Bates, Dec 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Todd
    Replies:
    2
    Views:
    452
    Joe Smith
    Jul 22, 2004
  2. Amit
    Replies:
    8
    Views:
    27,283
    Priyank
    Oct 13, 2011
  3. keithshen
    Replies:
    0
    Views:
    624
    keithshen
    Oct 21, 2007
  4. sophie_newbie

    Error when python script run as cgi script

    sophie_newbie, Oct 21, 2007, in forum: Python
    Replies:
    3
    Views:
    588
    Dennis Lee Bieber
    Oct 22, 2007
  5. fatted
    Replies:
    1
    Views:
    118
    Steve Grazzini
    Jul 25, 2003
Loading...

Share This Page