Message161066
Or for a practical example, here's how I used the above technique to solve this problem in web2py:
diff --git a/gluon/main.py b/gluon/main.py
index 57bf647..2f69c6b 100644
--- a/gluon/main.py
+++ b/gluon/main.py
@@ -68,6 +68,13 @@ create_missing_folders()
# set up logging for subsequent imports
import logging
import logging.config
+
+# This needed to prevent exception on Python 2.5:
+# NameError: name 'gluon' is not defined
+# See http://bugs.python.org/issue1436
+import gluon.messageboxhandler
+logging.gluon = gluon
+
logpath = abspath("logging.conf")
if os.path.exists(logpath):
logging.config.fileConfig(abspath("logging.conf")) |
|
Date |
User |
Action |
Args |
2012-05-18 17:01:46 | Marc.Abramowitz | set | recipients:
+ Marc.Abramowitz, gvanrossum, vinay.sajip, christian.heimes, sebastian |
2012-05-18 17:01:46 | Marc.Abramowitz | set | messageid: <1337360506.48.0.0764132331992.issue1436@psf.upfronthosting.co.za> |
2012-05-18 17:01:45 | Marc.Abramowitz | link | issue1436 messages |
2012-05-18 17:01:45 | Marc.Abramowitz | create | |
|