Accessing ASP-IIS objects in modules 
Author Message
 Accessing ASP-IIS objects in modules

I am using python in ASP under Microsoft IIS. I can use the IIS objects
like Server, Request and Response easily in my ASP script but cannot
access them from a module.

For example I want to use Response.Write("blah") from within a module
(called from an ASP script) but Reponse is not a known object from
there.

Any ideas?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 22 Dec 2002 03:00:00 GMT  
 Accessing ASP-IIS objects in modules

Quote:

> I am using Python in ASP under Microsoft IIS. I can use the IIS objects
> like Server, Request and Response easily in my ASP script but cannot
> access them from a module.

> For example I want to use Response.Write("blah") from within a module
> (called from an ASP script) but Reponse is not a known object from
> there.

> Any ideas?

Passing these as arguments to the module's functions that you're
calling seems cleanest to me.  One alternative might be to add
references to them to the __dict__ of the module you want to use
them from, a la

    themodule.__dict__['Response']=Response

from the ASP script, but that doesn't seem very clear/clean... or
maybe something like:

    themodule.Response = Response

is better.  Similarly operating with the __builtin__ module might
be worst from the POV of clarity and cleanliness, but, if you have
LOTS of modules that MUST directly access such global objects...
(warning: haven't tried any of these -- check if they work!-).

Alex



Mon, 23 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Pythonwin IIS-ASP module imports (bug)

2. Request: module that converts iis Request module to Dict like object

3. My modules doesn't seem to reload in IIS asp pages

4. Python + IIS/ASP questions (modules, namespaces, etc)

5. Object Rexx on IIS using CGI and ASP

6. using com object written in python from iis/asp

7. Python + Win32ALL + ASP = Problems accessing Request/Response/Session/Application objects

8. Global object in ASP (calling other scripting languages in ASP pages)

9. IIS hangs when using Topspeed ODBC with Active Server Pages (ASP)

10. TPS ODBC and MS IIS/ASP

11. ASP / IIS problems

12. IIS ASP Python 2.2 script works first time only

 

 
Powered by phpBB® Forum Software