Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to enable Python Scripts with MS IIS Web Server?

Reply
Thread Tools

How to enable Python Scripts with MS IIS Web Server?

 
 
syed_saqib_ali@yahoo.com
Guest
Posts: n/a
 
      02-04-2005



Hi. I have MS Windows Server 2003, Enterprise Edition.
It has MS Management Console 2.0, Version 5.2
and IIS Manager 6.0



I have a directory called "myDirs". Within this directory are 2 files:
1) index.pl (a perl script)
2) index.py (a python script whose first line is
"#!C:\Python21\pythonw.exe")

The webserver is listening on port 8080.

When I point my browser to http://localhost:8080/myDirs/index.pl, it
works... I see the output of the perl script.

HOWEVER,
When I point my browser to http://localhost:8080/myDirs/index.py, it
simply shows the python file as text. It doesn't interpret it at all.

How Can I get it to interpret the python file using the interpreter and
display the output in the browser?

Please explain each step in careful/excruciating detail because I'm a
windows Newbie.


-Saqib Ali

 
Reply With Quote
 
 
 
 
jb
Guest
Posts: n/a
 
      02-04-2005
hi,

you should first install win32all :
http://starship.python.net/crew/mhammond/

next, 2 ways 2 proceed, but the first is the easier :

you make a "test.asp" page in the folder

at the top, you write <@Language=Python%>

a line below : <%Response.Write("Hello World")%>

try if the page works well. if it works then your python/iis install is
ok

the second way is to keep the .py extension and to associate it with the
python executable

http://support.microsoft.com/default...en-us%3B276494

hope this helps


juju



<(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed). com...
>
>
>
> Hi. I have MS Windows Server 2003, Enterprise Edition.
> It has MS Management Console 2.0, Version 5.2
> and IIS Manager 6.0
>
>
>
> I have a directory called "myDirs". Within this directory are 2 files:
> 1) index.pl (a perl script)
> 2) index.py (a python script whose first line is
> "#!C:\Python21\pythonw.exe")
>
> The webserver is listening on port 8080.
>
> When I point my browser to http://localhost:8080/myDirs/index.pl, it
> works... I see the output of the perl script.
>
> HOWEVER,
> When I point my browser to http://localhost:8080/myDirs/index.py, it
> simply shows the python file as text. It doesn't interpret it at all.
>
> How Can I get it to interpret the python file using the interpreter and
> display the output in the browser?
>
> Please explain each step in careful/excruciating detail because I'm a
> windows Newbie.
>
>
> -Saqib Ali
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Using Python Scripts with IIS - ASP or Python-based CGI scripts withIIS - which makes more sense? davidj411 Python 0 06-27-2008 04:38 PM
How to enable people to pay me....(enable credit card payments in my web app) Patrick ASP .Net 1 11-10-2005 11:07 AM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Re: Stupid question: Making scripts python-scripts Jp Calderone Python 0 07-21-2005 02:38 PM



Advertisments