f = getattr(obj,"bar")
f()

guy lateur wrote:
> Hi all,
>
> Suppose you have this class:
>
> class foo:
>     def bar():
>
> Suppose you also have the strings "foo" and "bar". How can you obtain the
> function foo.bar()?
> 
> Surely somebody knows..
> 
> TIA,
> g

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to