Python scripts in IIS
Gandalf
gandalf at geochemsource.com
Tue Feb 24 13:32:30 EST 2004
Jon Cosby wrote:
>"Scott F" <sdfATexpertuneDOTcom> wrote
>
>
>>>Sorry. It's in the browser window. The script does not execute. I
>>>have "Show friendly http error messages" set to false in Internet
>>>Explorer. As it happens on all of the scripts, I can't single out
>>>one command. I have ActiveState's build of Python 2.3, and don't
>>>recall running into this previously, but there might be something
>>>in the IIS configuration I'm overlooking.
>>>
>>>
>>Go to the Properties of the (Default) Web site, Home Directory tab,
>>Configuration button. On the Mappings tab, add a mapping for Python in
>>the form
>>
>><pathtopython>\python.exe %s %s
>>
>>Use your actual pathtopython and don't substitute anything for %s %s.
>>
>>Should work fine.
>>
>>
>>
>Thanks. I had left out the trailing arguments. What is "%s" for, anyway?
>
>Jon
>
>
Sorry, I just read this message. I did not the beginning of this thread.
Jon, why don't you register
Python as an ActiveX scripting language? You can download and install
pywin32 extensions:
https://sourceforge.net/projects/pywin32/
then you can run this script:
site-packages\win32comext\axscript\client\pyscript.py
This will register Python as an ActiveX scripting language.
Then you can create an ASP page like this (index.asp):
<%@ Language=Python %>
<%
lst = [0,1,2,3]
Response.write(str(lst))
%>
I think it is better (and faster) to use Python as an ActiveX scripting
language then to use it as a CGI program.
Best,
G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040224/825e257b/attachment.html>
More information about the Python-list
mailing list