Try
import sys
import ExpensiveModuleStub
sys.modules['ExpensiveModule'] = ExpensiveModuleStub
sys.modules['ExpensiveModule'].__name__ = 'ExpensiveModule'
Should do the trick
--
Vyacheslav
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I was looking for a nice idiom for interpackage imports as I found
this thread.
Here come a couple of solutions I came up with. Any discussion is
welcome.
I assume the same file structure
\ App
| main.py
+--\subpack1
| | __init__.py
| | module1.py
|
+--\subpack2
| | __init__.py
| | module2.p