Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Python reflection and loading/calling external module classes (http://www.velocityreviews.com/forums/t707291-python-reflection-and-loading-calling-external-module-classes.html)

cmckenzie 12-01-2009 08:56 PM

Python reflection and loading/calling external module classes
 
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():

Dave Angel 12-01-2009 10:11 PM

Re: Python reflection and loading/calling external module classes
 


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



All times are GMT. The time now is 02:21 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.