dabo Commit
Revision 4720
Date: 2008-11-27 08:36:53 -0800 (Thu, 27 Nov 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4720

Changed:
U   trunk/dabo/dApp.py

Log:
Added the improvement provided by 'cowo' for proper importing of project 
subdirectory modules.


Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2008-11-26 15:42:26 UTC (rev 4719)
+++ trunk/dabo/dApp.py  2008-11-27 16:36:53 UTC (rev 4720)
@@ -5,6 +5,7 @@
 import warnings
 import glob
 import tempfile
+import imp
 import ConfigParser
 import inspect
 import datetime
@@ -909,7 +910,11 @@
                                except ImportError:
                                        self.__setattr__(dd, currmod)
                        else:
-                               self.__setattr__(dd, currmod)
+                               try:
+                                       (f, p, d) = imp.find_module(dd)
+                                       setattr(self, dd, imp.load_module(dd, 
f, p, d))
+                               except ImportError, e:
+                                       self.__setattr__(dd, currmod)
                sys.path = currsyspath
 
 




_______________________________________________
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]

Reply via email to