Excuting scripts question

dique chezdique at yahoo.com
Sun Jun 8 05:16:25 EDT 2003


Here is a helpful link on Setting up Python for CGI on IIS.
http://www.e-coli.net/pyiis.html

>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.)



"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 Windows
> > > > > environment? I have installed Python 2.2.3 in C:\Python22 directory.
> > > >
> > > Hi, I tried to run the script on IE (eg: http://192.168.0.2/test1.cgi)
>  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 Services/Default
> Web Site and go into properties. In the "Home Directory" tab, I went into
> "Configuration". Clicked "Add", put in the path of python.exe executable
> (C:\Python22\python.exe), extension "cgi" and pressed ok. Is this the right
> way to do it? I am planning to run this Win2000 machine as a web server for
> my cgi scripts that used to reside on a Unix machine. The script files and
> HTML files are saved into the C:\Inetpub\wwwroot directory.
> 
> Thanks
> 
> IE does not actually execute CGI or Python or
> > anything except *client-side* Javascript and Java.  If you want
> > 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 mailing list