is it possible to create an object by its name in the run time

Ryan(Yang) Zhang yzhang8 at
Tue Aug 17 05:07:03 CEST 2004

> Hi all,
>        I wonder if it is possible to create an object of func, class or
> method in the run time by it's name? To make it more clear, let me show
> an example: I parsed the python code and found a function with name 'len'.
> want to know if it is a build-in func(where can I look up?). If so, ignore
> it otherwise I want to find out which module is it defined in. All I know
> the name (which is a string), and all the modules that this program have
> imported. In the same way, I also need to process the class and methods
> call. I wonder if it is possible? I will appreciate your help very much!!
> -Ryan
> -- 

More information about the Python-list mailing list