[mod_python] Some questions

riesch at nieuw.nl riesch at nieuw.nl
Wed Aug 1 13:03:02 EST 2001


Hi all


I'm dubbing with some questions.

Cookies
Is there a way to detect whether a user supports cookies, or is that only possible by setting a cookie and not recieving?

Globals
I have some central files, which are to be used by multiple sites, where every site defines its own handler for python. Now in those central files I've defined a class which should be known throughout a site (not the other sites !). In my ultimate laziness, I've defined the instance as follows:

# start of Application.py


class Application:
   ...
# end of class definition

global app
app = Application()


# end of Application.py

Every site imports this file. Now I'm not sure whether every site now has the same instance, or if every site has a different instance. I'm geussing every site has another instance, since it defines its own handler and  should be run as a separate program, but I don't know how mod-python handles this.


Any suggestions?

Richard


Btw:
All-right for the patch. I'm definetly gonna use that!



More information about the Mod_python mailing list