dabo Commit
Revision 4460
Date: 2008-08-27 09:28:05 -0700 (Wed, 27 Aug 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4460
Changed:
U trunk/dabo/__init__.py
Log:
Whoops! Forgot to include this in the previous commit. The debug output won't
work without this!
Diff:
Modified: trunk/dabo/__init__.py
===================================================================
--- trunk/dabo/__init__.py 2008-08-27 16:01:24 UTC (rev 4459)
+++ trunk/dabo/__init__.py 2008-08-27 16:28:05 UTC (rev 4460)
@@ -103,6 +103,7 @@
import os
import sys
+import logging
try:
import pysqlite2
except ImportError:
@@ -172,6 +173,20 @@
import dabo.biz
import dabo.ui
+def debugout(*args):
+ txtargs = [unicode(arg) for arg in args]
+ txt = " ".join(txtargs)
+ log = logging.getLogger("Debug")
+ log.debug(txt)
+# Mangle the namespace so that developers can add lines like:
+# debugo("Some Message")
+# or
+# debugout("Another Message", self.Caption)
+# to their code for debugging.
+# (I added 'debugo' as an homage to Whil Hentzen!)
+import __builtin__
+__builtin__.debugo = __builtin__.debugout = dabo.debugout
+
# Store the base path to the framework
frameworkPath = os.path.dirname(dabo.__file__)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]