Python in ASP pages
Andrew Henshaw
andrew.henshaw at mail.com
Mon May 13 17:21:22 EDT 2002
Mac Martine wrote:
> Hi-
>
> - I am on Windows XP.
>
> -I have Python2.2 installed (I think this is different from the
> ActiveState version...i'm new to this, so I'm unclear)
>
> -So, I am trying to run Python code in my ASP pages. I managed to get
> .py files to run in my browser, but I can't get Python code to run in my
> asp pages.
>
> I'm trying:
> <%@ Language = Python %>
> <HTML>
> <head></head>
> <body>
> <h1>Python Test</h1>
> </body>
> </html>
>
> ...and I get an error on the first line saying "Unknown scripting
> language 'Python'"
>
> any ideas? thanks a lot!
> -Mac
Perhaps you don't have Mark Hammond's win32all add-on. It's included with
ActiveState's distribution, but not the standard python.org distribution.
Once you get that (look on python.org on the download page for a Windows
link) and install it, there is a script that will register Python with IIS.
Look in the win32com help file for instructions; but, it should direct you
to run pyscript.py which (by default) is located in:
PYTHON_HOME\win32comext\axscript\client
Where PYTHON_HOME is the location of your Python installation.
Good luck!
Andy Henshaw
More information about the Python-list
mailing list