Python CGI running commands under NT
Paul Robinson
paul.robinson at quantisci.co.uk
Thu Apr 13 04:53:57 EDT 2000
Pieter Claerhout wrote:
>
> Hello,
>
> I made a Python CGI-script that executes a DOS-command and
> should return the result in a HTML page. The script looks
> as follows:
>
> import os
>
> pipe = os.popen("ipconfig", 'r')
> text = pipe.read()
Pieter,
By default IIS does not create a console associated with a CGI process.
This means that the pipe has nowhere to read from!
See: http://support.microsoft.com/support/kb/articles/Q194/9/48.ASP
For some info on how you can change this behaviour. I've tried this in
the past with limited success (and I also found it hard to turn it off
again!).
Paul.
-----------------------------------
Business Collaborator Team
Enviros Software Solutions
http://www.businesscollaborator.com
-----------------------------------
More information about the Python-list
mailing list