Python reflection and loading/calling external module classes

Dave Angel davea at ieee.org
Tue Dec 1 17:11:41 EST 2009



cmckenzie wrote:
> Hi! I've been putting off playing with Python for sometime now and I
> recently came up with a worthwhile project for my first hack. One
> technical challenge I'm trying to work out is dynamically loading
> modules from a directory (glob'd for a specific filename format) then
> importing them for calling later.
>
> Basically my modules follow this structure:
>
> class sample():
>
>   
Your message was cut-off before you finished,  but the answer is 
probably the built-in function __import_().


DaveA




More information about the Python-list mailing list