|
Michael C. Neel
neel at mediapulse.com
Tue Dec 2 11:44:34 EST 2003
Hi all,
I don't know if it's not there, or I'm just overlooking it, but
I can seem for a way in code to get the version of mod_python. I have
some "default" modules I use, and I am trying to make them work with any
mod_python version. Right now I'm doing try block, like such:
# Get username/password from client
pw = req.get_basic_auth_pw()
try:
# mod_python 2.x
user = req.connection.user
except:
# mod_python 3.x
user = req.user
...but I'd rather be able to get the version directly.
Mike
|