Excuting scripts question
ken at hotmail.com
Sun Jun 8 12:04:19 CEST 2003
"dique" <chezdique at yahoo.com> wrote in message
news:c2c98495.0306080116.40ae59fa at posting.google.com...
> Here is a helpful link on Setting up Python for CGI on IIS.
> From the article, it seems that you should put C:\Python22\python.exe
> -u %s %s instead. (Perhaps C:\Python22\python.exe -u "%s" "%s" is
> safer, with the quotes on.)
I followed it and it loaded. But instead of executing the script, it is
displaying as a text. Any ideas how to fix it?
> "Ken" <ken at hotmail.com> wrote in message
news:<bbu7gc$ddp76$1 at ID-49758.news.dfncis.de>...
> > "Peter Hansen" <peter at engcorp.com> wrote in message
> > news:3EE28A13.65FD29DD at engcorp.com...
> > > Ken wrote:
> > > >
> > > > > > Hi, I have a few scripts that ran well in Unix environment with:
> > > > > > #!/usr/local/bin/python
> > > > > >
> > > > > > What do I need to change to if I relocate these scripts on a
> > > > > > environment? I have installed Python 2.2.3 in C:\Python22
> > > > >
> > > > Hi, I tried to run the script on IE (eg:
> > but
> > > > it doesn't seem to load. (The script seems to load forever... but
> > ordinary
> > > > html files work)
> > >
> > > And 192.168.0.2 is your own machine?
> > Yes
> > Do you have a web server
> > > running on it?
> > I installed IIS. (I am running Windows 2000 Pro)
> > I went into Control Panel/Admin Tools/Internet Information
> > Web Site and go into properties. In the "Home Directory" tab, I went
> > "Configuration". Clicked "Add", put in the path of python.exe executable
> > (C:\Python22\python.exe), extension "cgi" and pressed ok. Is this the
> > way to do it? I am planning to run this Win2000 machine as a web server
> > my cgi scripts that used to reside on a Unix machine. The script files
> > HTML files are saved into the C:\Inetpub\wwwroot directory.
> > Thanks
> > IE does not actually execute CGI or Python or
> > > to execute CGI, you have to have a web server running, and the
> > > web server itself executes the CGI and returns its results to
> > > IE in the form of HTML.
> > >
> > > IE can handle HTML that is loaded from the local filesystem, but
> > > consider this to be a special feature, not something that means
> > > you can treat your hard drive exactly as you treat a web server.
> > >
> > > If you want to learn more, try looking at CGIHTTPServer in the
> > > standard library, or look into setting up another web server
> > > locally, perhaps ... Twisted. :-)
> > >
> > > -Peter
More information about the Python-list