Importing Modules

Peter Hansen peter at engcorp.com
Tue Nov 1 20:33:26 EST 2005


Walter Brunswick wrote:
> What is the best way to import all modules in a directory 
 > (and possibly a subdirectory/subdirectories), possibly including
> conditionals, such as regexes? 

The "best" was, as always, depends on what your use case is.  Why do you 
want to do this?  What will you do with the modules once they are imported?

Also: the second part of the question doesn't mean anything to me.  What 
do you mean by "conditionals, such as regexes", in the context of 
importing modules?

-Peter



More information about the Python-list mailing list