> tb = __import__('BMTest2')
This yields the _module_ BMTest2 in the variable tb. Now in that module
there is a class BMToolbar that defines PrintHello - so this should work:
tb.BMToolBar(self).PrintHello()
It worked with your commented lines because you did
from BMTest2 import BMToolbar
which results in BMToolbar beeing part of the global namespace, so you could
do
BMToolBar(self).PrintHello()
I suggest you re-read the tutorial sections covering modules for the
nitty-gritty details of importing.
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list