Re: [coders] Dynamically loading python classes

2008-02-25 Thread Andrew Bennetts
Carlo Sogono wrote: > I need to be able to load and access Python classes based on a module and > class names defined by strings. So let's say someone passes > 'MyFavouriteClass' and 'somemodule'. I would like to be able to access > MyFavouriteClass() within the module somemodule. Is this at all

Re: [coders] Dynamically loading python classes

2008-02-25 Thread Steve Lindsay
On Tue, Feb 26, 2008 at 2:39 PM, Carlo Sogono <[EMAIL PROTECTED]> wrote: > Basically my application must be passed a name of a module and class so > that we can access it. > This might help: http://www.diveintopython.org/functional_programming/dynamic_import.html CheersSteve __

[coders] Dynamically loading python classes

2008-02-25 Thread Carlo Sogono
I need to be able to load and access Python classes based on a module and class names defined by strings. So let's say someone passes 'MyFavouriteClass' and 'somemodule'. I would like to be able to access MyFavouriteClass() within the module somemodule. Is this at all possible? And if not, what