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. Advertisements

  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. Advertisements

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. Yong Wang
    Replies:
    1
    Views:
    356
    Larry Bates
    Aug 4, 2004
  2. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    1,110
    Michael Sparks
    Jul 30, 2005
  3. Amir  Michail

    cgi relay for python cgi script

    Amir Michail, Oct 4, 2005, in forum: Python
    Replies:
    7
    Views:
    745
    Michael Ekstrand
    Oct 4, 2005
  4. sophie_newbie

    Error when python script run as cgi script

    sophie_newbie, Oct 21, 2007, in forum: Python
    Replies:
    3
    Views:
    753
    Dennis Lee Bieber
    Oct 22, 2007
  5. excord80
    Replies:
    17
    Views:
    1,102
    J Kenneth King
    Jan 29, 2009
  6. Replies:
    9
    Views:
    1,328
    Paddy O'Loughlin
    Feb 27, 2009
  7. fatted
    Replies:
    1
    Views:
    307
    Steve Grazzini
    Jul 25, 2003
  8. kath
    Replies:
    4
    Views:
    1,116
    J. Gleixner
    Apr 9, 2007
Loading...