How to enable Python Scripts with MS IIS Web Server?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • syed_saqib_ali@yahoo.com

    #1

    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

  • jb

    #2
    Re: How to enable Python Scripts with MS IIS Web Server?

    hi,

    you should first install win32all :


    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=Pyth on%>

    a line below : <%Response.Writ e("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



    hope this helps


    juju



    <syed_saqib_ali @yahoo.com> a écrit dans le message de news:
    1107531390.6885 83.231970@l41g2 00...legr oups.com...[color=blue]
    >
    >
    >
    > 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
    >[/color]


    Comment

    Working...