run a script and supply commands from a python cgi script

Larry Bates larry.bates at websafe.com
Thu Dec 14 12:16:55 EST 2006


moishyyehuda at gmail.com 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



More information about the Python-list mailing list