Importing a package and looping through modules in the package
Dave
rezaim_1999 at yahoo.com
Tue Feb 10 15:14:07 EST 2004
Rich Krauter <rmkrauter at yahoo.com> wrote in message news:<mailman.1397.1076388282.12720.python-list at python.org>...
> On Mon, 2004-02-09 at 22:29, Dave wrote:
> > Hi Everyone,
> >
> > I am trying to import a package and then loop through the modules
> > inside the package, but I'm running to a problem. Basically:
> > -----
> > I have a package called
> > regression.changepassword.unittests which contains test modules.
> > ---
> > In a test agent module (called agent.a), I do the following:
> >
> > from regression.changepassword.unittests import *
> > utilities.runTests("regression.changepassword.unittests.")
>
>
> Do you have __all__ defined in your __init__.py in
> regression.changepassword.unittests?
>
> This part of the tutorial might help:
> http://www.python.org/doc/current/tut/node8.html#SECTION008410000000000000000
>
> Rich
Hi Rich,
Thanks for your response. That was exactly what the problem was. I
should have gone through the tutorial more carefully :).
Thanks,
Bardia
More information about the Python-list
mailing list