Hi.

My primary development environment on all platforms is Eclipse PyDev.
Because Dabo UI layer is loaded dynamically, I got all dabo.ui modules
references as unresolved.
I have found that dabo.ui package contains code to initial UI layer loading,
it uses DABO_DEFAULT_UI environment variable.
Unfortunately, because of plenty of cross module references it doesn't 
work.

Traceback (most recent call last):
   File "C:\Projekty\test.py", line 8, in <module>
     import dabo
   File "C:\Python26\lib\site-packages\dabo\__init__.py", line 287, in 
<module>
     import dEvents
   File "C:\Python26\lib\site-packages\dabo\dEvents.py", line 6, in <module>
     import dabo.ui as ui
   File "C:\Python26\lib\site-packages\dabo\ui\__init__.py", line 94, in 
<module>
     from uiwx import *
   File "C:\Python26\lib\site-packages\dabo\ui\uiwx\__init__.py", line 
14, in <module>
     import dabo.dEvents as dEvents
AttributeError: 'module' object has no attribute 'dEvents'

Instead of this, I added to the end of dabo.__init__.py module the 
following code:

try:
     __defaultUI = os.environ["DABO_DEFAULT_UI"]
     dabo.ui.loadUI(__defaultUI)
except KeyError:
     pass
finally:
     del __defaultUI

This works for me, and there is no cross reference exceptions anymore.
My question is, could you implement this in Dabo by default?

-- 
Regards
Jacek Kałucki


_______________________________________________
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