Pete Emerson wrote: > In a module, how do I create a conditional that will do something > based on whether or not another module has been loaded? > > Suppose I have the following: > > import foo > import foobar > > print foo() > print foobar() > By the way, the above statements are never going to work, because modules aren't callable. Maybe you want
print foo.foo() print foobar.foobar() regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS: http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list