473,403 Members | 2,293 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,403 software developers and data experts.

Python equivalent of Perl-ISAPI?

Is there an effcient way (more so than cgi) of using Python
with Microsoft IIS? Something equivalent to Perl-ISAPI?

Mar 18 '06 #1
12 2304
<ru***@yahoo.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com...
Is there an effcient way (more so than cgi) of using Python
with Microsoft IIS? Something equivalent to Perl-ISAPI?


Pywin32 comes with an ISAPI package. See
\lib\site-packages\isapi\samples\
for some demos.

Roger


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Mar 18 '06 #2
What Roger says and also:
http://pyisapie.sourceforge.net/

Mar 19 '06 #3

Waldemar Osuch wrote:
What Roger says and also:
http://pyisapie.sourceforge.net/


Thanks for your and Roger's responses.

I looked at pyisapie and there seems to be almost no
dvcumentation -- no sample code and the single readme
is pretty opaque. The pywin isapi has a couple of
examples but its documentation too is pretty bad.
But they both seem to be tissue thin wtrappers around
the MS isapi api. What I was hoping for is something
that would let me run existing cgi scripts efficiently with
minimal changes. I think the isapi and perl-ex stuff that
comes with Activestate's Perl meets this requirement
but the stuff I've found for Python doesn't. So looks
like it's back to Perl for this project :-(.

Mar 20 '06 #4
ru***@yahoo.com wrote:
Waldemar Osuch wrote:
What Roger says and also:
http://pyisapie.sourceforge.net/

Thanks for your and Roger's responses.

I looked at pyisapie and there seems to be almost no
dvcumentation -- no sample code and the single readme
is pretty opaque. The pywin isapi has a couple of
examples but its documentation too is pretty bad.
But they both seem to be tissue thin wtrappers around
the MS isapi api. What I was hoping for is something
that would let me run existing cgi scripts efficiently with
minimal changes. I think the isapi and perl-ex stuff that
comes with Activestate's Perl meets this requirement
but the stuff I've found for Python doesn't. So looks
like it's back to Perl for this project :-(.

If you want CGI then there's no need for an ISAPI filter specific to
your programming language - you just need to associate .py requests with
the Python interpreter.

If you want to use Python as an Active Scripting language (i.e. in the
same way that VBScript is used) then you can do this by installing the
win32all extensions maintained by Mark Hammond and enabling Active
Scripting therein.

Don't suffer Perl if you don't want to!

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com

Mar 20 '06 #5

Steve Holden wrote:
If you want CGI then there's no need for an ISAPI filter specific to
your programming language - you just need to associate .py requests with
the Python interpreter.

If you want to use Python as an Active Scripting language (i.e. in the
same way that VBScript is used) then you can do this by installing the
win32all extensions maintained by Mark Hammond and enabling Active
Scripting therein.

Don't suffer Perl if you don't want to!


Pure cgi is too slow. "Active Scripting" means ASP, yes?
I need something that will do cgi scripts (a lot of which I already
have
and can modify but don't want to rewrite extensively, partly because
of time issues, partly because I want to preserve some degree of
portability back to a unix environment.). I want something that does
for IIS what mod_python does for apache. Fastcgi looked scary even
on unix plaforms, seems like an act of desperation on Windows,

Mar 20 '06 #6
ru***@yahoo.com wrote:
Steve Holden wrote:
If you want CGI then there's no need for an ISAPI filter specific to
your programming language - you just need to associate .py requests with
the Python interpreter.

If you want to use Python as an Active Scripting language (i.e. in the
same way that VBScript is used) then you can do this by installing the
win32all extensions maintained by Mark Hammond and enabling Active
Scripting therein.

Don't suffer Perl if you don't want to!

Pure cgi is too slow. "Active Scripting" means ASP, yes?
I need something that will do cgi scripts (a lot of which I already
have
and can modify but don't want to rewrite extensively, partly because
of time issues, partly because I want to preserve some degree of
portability back to a unix environment.). I want something that does
for IIS what mod_python does for apache. Fastcgi looked scary even
on unix plaforms, seems like an act of desperation on Windows,

Yes, ASP is Active Scripting.

Remember to use <@ LANGUAGE="PYTHON" @>

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com

Mar 20 '06 #7

Steve Holden wrote:
ru***@yahoo.com wrote:

Pure cgi is too slow. "Active Scripting" means ASP, yes?
I need something that will do cgi scripts (a lot of which I already
have
and can modify but don't want to rewrite extensively, partly because
of time issues, partly because I want to preserve some degree of
portability back to a unix environment.). I want something that does
for IIS what mod_python does for apache. Fastcgi looked scary even
on unix plaforms, seems like an act of desperation on Windows,

Yes, ASP is Active Scripting.

Remember to use <@ LANGUAGE="PYTHON" @>


Except I need cgi, not asp, for the reasons i gave.

Mar 20 '06 #8

ru***@yahoo.com wrote:
Steve Holden wrote:
ru***@yahoo.com wrote:

Pure cgi is too slow. "Active Scripting" means ASP, yes?
I need something that will do cgi scripts (a lot of which I already
have
and can modify but don't want to rewrite extensively, partly because
of time issues, partly because I want to preserve some degree of
portability back to a unix environment.). I want something that does
for IIS what mod_python does for apache. Fastcgi looked scary even
on unix plaforms, seems like an act of desperation on Windows,

Yes, ASP is Active Scripting.

Except I need cgi, not asp, for the reasons i gave.


it seems to me you have no clear idea what you need.

you say you have a lot of CGIs written but you don't clarify if that is
Python or Perl. since you look for python intergration, it seems they
are in python, however in previous posting you say you'll have to
revert to Perl for solution. it just doesnt make sense! if you use
Perl, you will have to REWRITE the scripts and if you do so, it's
unclear why wouldnt you use a superior technology like PHP/ASP/JSP -
any of those is way easier to manage.

it's also unclear why don't you use apache on windows, if mod_python is
your poison.

here is how i imagine you have the layers:
[scripts (CGI?)]
[glue]
[web server (IIS?)]

where the discussion is about the "glue" between them. you say CGI is
too slow for you, so you will want something maintaining the CGI
programming model, but faster. this thing is called FastCGI - but you
are unhappy about it either. there is no way any perl "glue" can solve
your problem between your web server and your python scripts
whatsoever. you'll have to re-code the scripts for perl.

Mar 20 '06 #9
Atanas Banov wrote:
ru***@yahoo.com wrote:
Steve Holden wrote:
ru***@yahoo.com wrote:

> Pure cgi is too slow. "Active Scripting" means ASP, yes?
> I need something that will do cgi scripts (a lot of which I already
> have
> and can modify but don't want to rewrite extensively, partly because
> of time issues, partly because I want to preserve some degree of
> portability back to a unix environment.). I want something that does
> for IIS what mod_python does for apache. Fastcgi looked scary even
> on unix plaforms, seems like an act of desperation on Windows,
>
Yes, ASP is Active Scripting.

Except I need cgi, not asp, for the reasons i gave.


it seems to me you have no clear idea what you need.

you say you have a lot of CGIs written but you don't clarify if that is
Python or Perl. since you look for python intergration, it seems they
are in python, however in previous posting you say you'll have to
revert to Perl for solution. it just doesnt make sense! if you use
Perl, you will have to REWRITE the scripts and if you do so, it's
unclear why wouldnt you use a superior technology like PHP/ASP/JSP -
any of those is way easier to manage.

it's also unclear why don't you use apache on windows, if mod_python is
your poison.

here is how i imagine you have the layers:
[scripts (CGI?)]
[glue]
[web server (IIS?)]

where the discussion is about the "glue" between them. you say CGI is
too slow for you, so you will want something maintaining the CGI
programming model, but faster. this thing is called FastCGI - but you
are unhappy about it either. there is no way any perl "glue" can solve
your problem between your web server and your python scripts
whatsoever. you'll have to re-code the scripts for perl.


The final solution must run in a Windows/IIS environment.
Those are part of the requirements which I do not control.
There is code in both Perl and Python. I wrote the Python
stuff and inherited the Perl stuff. It is not web-based now
but conversion to generate html output instead of text is
probably straightforward. Additional requirement is that
is should be movable to unix without too much work.
The layers are:

[database] [equipment interface]
[glue]
[cgi]
[webserver - IIS]

As fo PHP/ASP/JSP? I am doing all the work. I know Perl
and Python. I don't know PHP/JSP. (Also, JSP will require
a lot of new Java infrastructure support, yes?) As for ASP,
I wonder about the "easily moved to unix" requirement.
(I know apache has an asp module but I don't know if other
web servers do, or how compatible apache's is, and I don't
know if I have time to reliably answer those questions.)
Why do you say PHP/JSP/ASP are superior technologies?

All I want to do is avoid the cost of starting a new Python
(or Perl) interpreter on each page request. This is what
I understand Perl-isapi and Perl-Ex does. My question
is simply if there is something similar for Python.
I have concluded the answer is no but hope I'm wrong.

Mar 21 '06 #10
Atanas Banov wrote:
ru***@yahoo.com wrote:
Steve Holden wrote:
ru***@yahoo.com wrote:

> Pure cgi is too slow. "Active Scripting" means ASP, yes?
> I need something that will do cgi scripts (a lot of which I already
> have
> and can modify but don't want to rewrite extensively, partly because
> of time issues, partly because I want to preserve some degree of
> portability back to a unix environment.). I want something that does
> for IIS what mod_python does for apache. Fastcgi looked scary even
> on unix plaforms, seems like an act of desperation on Windows,
>
Yes, ASP is Active Scripting.

Except I need cgi, not asp, for the reasons i gave.


it seems to me you have no clear idea what you need.

you say you have a lot of CGIs written but you don't clarify if that is
Python or Perl. since you look for python intergration, it seems they
are in python, however in previous posting you say you'll have to
revert to Perl for solution. it just doesnt make sense! if you use
Perl, you will have to REWRITE the scripts and if you do so, it's
unclear why wouldnt you use a superior technology like PHP/ASP/JSP -
any of those is way easier to manage.

it's also unclear why don't you use apache on windows, if mod_python is
your poison.

here is how i imagine you have the layers:
[scripts (CGI?)]
[glue]
[web server (IIS?)]

where the discussion is about the "glue" between them. you say CGI is
too slow for you, so you will want something maintaining the CGI
programming model, but faster. this thing is called FastCGI - but you
are unhappy about it either. there is no way any perl "glue" can solve
your problem between your web server and your python scripts
whatsoever. you'll have to re-code the scripts for perl.


The final solution must run in a Windows/IIS environment.
Those are part of the requirements which I do not control.
There is code in both Perl and Python. I wrote the Python
stuff and inherited the Perl stuff. It is not web-based now
but conversion to generate html output instead of text is
probably straightforward. Additional requirement is that
is should be movable to unix without too much work.
The layers are:

[database] [equipment interface]
[glue]
[cgi]
[webserver - IIS]

As fo PHP/ASP/JSP? I am doing all the work. I know Perl
and Python. I don't know PHP/JSP. (Also, JSP will require
a lot of new Java infrastructure support, yes?) As for ASP,
I wonder about the "easily moved to unix" requirement.
(I know apache has an asp module but I don't know if other
web servers do, or how compatible apache's is, and I don't
know if I have time to reliably answer those questions.)
Why do you say PHP/JSP/ASP are superior technologies?

All I want to do is avoid the cost of starting a new Python
(or Perl) interpreter on each page request. This is what
I understand Perl-isapi and Perl-Ex does. My question
is simply if there is something similar for Python.
I have concluded the answer is no but hope I'm wrong.

Mar 21 '06 #11

ru***@yahoo.com wrote:
Atanas Banov wrote:
ru***@yahoo.com wrote:
Steve Holden wrote:
> ru***@yahoo.com wrote:

> > Pure cgi is too slow. "Active Scripting" means ASP, yes?
> > I need something that will do cgi scripts (a lot of which I already
> > have
> > and can modify but don't want to rewrite extensively, partly because
> > of time issues, partly because I want to preserve some degree of
> > portability back to a unix environment.). I want something that does
> > for IIS what mod_python does for apache. Fastcgi looked scary even
> > on unix plaforms, seems like an act of desperation on Windows,
> >
> Yes, ASP is Active Scripting.
>
Except I need cgi, not asp, for the reasons i gave.


it seems to me you have no clear idea what you need.

you say you have a lot of CGIs written but you don't clarify if that is
Python or Perl. since you look for python intergration, it seems they
are in python, however in previous posting you say you'll have to
revert to Perl for solution. it just doesnt make sense! if you use
Perl, you will have to REWRITE the scripts and if you do so, it's
unclear why wouldnt you use a superior technology like PHP/ASP/JSP -
any of those is way easier to manage.

it's also unclear why don't you use apache on windows, if mod_python is
your poison.

here is how i imagine you have the layers:
[scripts (CGI?)]
[glue]
[web server (IIS?)]

where the discussion is about the "glue" between them. you say CGI is
too slow for you, so you will want something maintaining the CGI
programming model, but faster. this thing is called FastCGI - but you
are unhappy about it either. there is no way any perl "glue" can solve
your problem between your web server and your python scripts
whatsoever. you'll have to re-code the scripts for perl.


The final solution must run in a Windows/IIS environment.
Those are part of the requirements which I do not control.
There is code in both Perl and Python. I wrote the Python
stuff and inherited the Perl stuff. It is not web-based now
but conversion to generate html output instead of text is
probably straightforward. Additional requirement is that
is should be movable to unix without too much work.
The layers are:

[database] [equipment interface]
[glue]
[cgi]
[webserver - IIS]

As fo PHP/ASP/JSP? I am doing all the work. I know Perl
and Python. I don't know PHP/JSP. (Also, JSP will require
a lot of new Java infrastructure support, yes?) As for ASP,
I wonder about the "easily moved to unix" requirement.
(I know apache has an asp module but I don't know if other
web servers do, or how compatible apache's is, and I don't
know if I have time to reliably answer those questions.)
Why do you say PHP/JSP/ASP are superior technologies?

All I want to do is avoid the cost of starting a new Python
(or Perl) interpreter on each page request. This is what
I understand Perl-isapi and Perl-Ex does. My question
is simply if there is something similar for Python.
I have concluded the answer is no but hope I'm wrong.


Din't find anything more and no further replies
here so here is a quick timing I did...
Perl-Ex: 0.014 sec/page
Perl-ISAPI: 0.168 sec/page
Perl-cgi: 0.187 sec/page
Python-cgi: 0.286 sec/page

I can't ignore the 20X better performance of
Perl-Ex vs Python, so I guess this is a loss
for Python and a win for Perl.

Mar 22 '06 #12
it is your loss as well (so, 2 losses and 1 win).

you comparing perl-ex with python-cgi is unfair, to say the least.
let's count:

1. you ditched python ASP, because you dont know how it may port on
linux (even if it's supported on apache and you probably never, ever,
will have to do the said port).

2. you ditched mod_python, because it's for apache and not for IIS.

3. you picked perl-ex, because... it works fast on IIS, even if it
doesnt work on apache or linux.

hard to speak about fairness here. besides i guess your tests are based
on dummy script pages, which do nothing and the real pages which
interface with DB and equipment, will spend 10 times more time doing
real work, say 1500ms. now tell me what is the difference between 1.514
sec and 1.786 sec wait time? and even if that were not the case, what
is the diffrence for a user between 0.014 and 0.286 seconds? part of a
blink of the eye?!

- nas
Din't find anything more and no further replies
here so here is a quick timing I did...
Perl-Ex: 0.014 sec/page
Perl-ISAPI: 0.168 sec/page
Perl-cgi: 0.187 sec/page
Python-cgi: 0.286 sec/page

I can't ignore the 20X better performance of
Perl-Ex vs Python, so I guess this is a loss
for Python and a win for Perl.


Apr 8 '06 #13

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

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
226
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type...
1
by: Edward WIJAYA | last post by:
Hi, I am new to Python, and I like to learn more about it. Since I am used to Perl before, I would like to know what is Python equivalent of Perl code below: $filename = $ARGV;
41
by: Xah Lee | last post by:
here's another interesting algorithmic exercise, again from part of a larger program in the previous series. Here's the original Perl documentation: =pod merge($pairings) takes a list of...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
5
by: mbbx6spp | last post by:
Hi All, I already searched this newsgroup and google groups to see if I could find a Python equivalent to Perl's Template::Extract, but didn't find anything leading to a Python module that had...
20
by: Xah Lee | last post by:
Sort a List Xah Lee, 200510 In this page, we show how to sort a list in Python & Perl and also discuss some math of sort. To sort a list in Python, use the “sort” method. For example: ...
14
by: ccdetail | last post by:
http://www.tiobe.com/index.htm?tiobe_index Python is the 7th most commonly used language, up from 8th. The only one gaining ground besides VB in the top 10. We're glad, our app is written in...
10
by: Mladen Gogala | last post by:
I am a Python newbie who decided to see what that Python fuss is all about. Quite frankly, I am a bit perplexed. After having had few months of experience with Perl (started in 1994 with Perl v4,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.