Execute a command from a cgi script

Ted tedlandis at rogers.com
Thu Jun 3 06:28:37 CEST 2004


Hi all,

I am trying to execute a batch file from a python cgi script on an IIS
webserver on Win2K. I have changed all the permissions I can think of.
The command I am using is:

p = os.spawnl(os.P_WAIT, 'spameggs.bat')

I am using spawn because I need the Wait, but I have tried popen* and
command and none of them work either.

The odd thing is that if I embed the python code in an asp page it
works just fine. I am aware there are a lot of variables here but has
anyone seen anything like this before?

Thanks,
Ted



More information about the Python-list mailing list