Execute a command from a cgi script
tedlandis at rogers.com
Mon Jun 7 04:51:59 CEST 2004
fishboy <fishboy at spamspamspam.com> wrote in message news:<8735c09t40h6nnavhnt9plc4ad8t6jdrrm at 4ax.com>...
> On 2 Jun 2004 21:28:37 -0700, tedlandis at rogers.com (Ted) wrote:
> >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?
> try os.system()?
Yes, I've tried popen, system, spawn and even the win32 library
wscript stuff. None of them run.
More information about the Python-list