473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to enable Python Scripts with MS IIS Web Server?


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

Jul 18 '05 #1
1 3271
jb
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

<sy************@yahoo.com> a écrit dans le message de news:
11**********************@l41g2000cwc.googlegroups. 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

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Derek White | last post by:
Ok here's the deal. We are finally getting DSL again... but our PC is in the living room... and the youngest has figured out that if he hits the right keys... he can bring up Internet Explorer....
9
by: Jeff Wagner | last post by:
I have a project of converting numerous DOS cmd shell scripts to Python. Is there a tutorial to getting started? Thanks, Jeff
0
by: gabedog | last post by:
What would be a good (and safe) way to enable/disable a web site in a web farm that needs to come down for maintenance? Periodically, we have db folks that run db scripts. I'd like to put a back...
37
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our...
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
1
by: Michael Tissington | last post by:
How can I enable execute permissions for a folder on my website using the web.config file ?
7
by: Anthony | last post by:
Hi, I'm a FoxPro programmer, but I want to learn python before it's too late. I do a lot of statistical programming, so I import SPSS into python. In my opinion, the best features of Visual...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.