This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marc.Abramowitz
Recipients Marc.Abramowitz, christian.heimes, gvanrossum, sebastian, vinay.sajip
Date 2012-05-18.17:01:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337360506.48.0.0764132331992.issue1436@psf.upfronthosting.co.za>
In-reply-to
Content
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"))
History
Date User Action Args
2012-05-18 17:01:46Marc.Abramowitzsetrecipients: + Marc.Abramowitz, gvanrossum, vinay.sajip, christian.heimes, sebastian
2012-05-18 17:01:46Marc.Abramowitzsetmessageid: <1337360506.48.0.0764132331992.issue1436@psf.upfronthosting.co.za>
2012-05-18 17:01:45Marc.Abramowitzlinkissue1436 messages
2012-05-18 17:01:45Marc.Abramowitzcreate