Help! IIS and Python

Max M maxm at
Tue Feb 26 23:22:46 CET 2002

Jim Abrams wrote:

> If, like me, you don't have the option of moving away from IIS, you can 
> save yourself alot of headache, time, and resources by writing a nice 
> wrapper object, sticking Response inside and using your own. You can then 
> add sorely lacking functionality, like str conversion, to it as well as any 
> additional shortcuts.
> I do it for most of the built ins (Response, Request, Server, Appication, 
> Session) and it's been a lifesaver.

If thats your bag, feel free to use my 'iisUtils' module.

It both has a windows version of Pythons FieldStorage, and a Dict 
version of the Request.

To get FieldStorage:

import iisUtils

fs = iisUtils.winFieldStorage(Request)

<%= fs['somevar'].value%>

This is good because it can handle file uploads. But it's a bother that 
it's not a stright dict for the rest.

So to get Request as a plain dict:

req = iisUtils.request(Request)

<%= req['somevar']%>


Its documented in the code and works nicely in production code. If there 
are _many_ fields in the form 'request' is faster than 'winFieldStorage'.

regards Max M
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
URL: <>

More information about the Python-list mailing list