[PD-ot] Python method substitution

Jamie Bullock jamie at postlude.co.uk
Mon Apr 24 17:44:48 CEST 2006



Thanks Frank,

That's just the ticket..

Ciao!

On Mon, 24 Apr 2006 14:29:50 +0200
Frank Barknecht <fbar at footils.org> wrote:

> Hallo,
> Jamie Bullock hat gesagt: // Jamie Bullock wrote:
> 
> > Well this is extremely OT, but someone on this list might be willing to help...
> > 
> > Does anyone know of a way to use a variable in place of a method name Python. Something like:
> > 
> > foo = 'method'
> > bar.foo
> > 
> > whereby bar.foo gets substituted by bar.method
> 
> pydoc getattr
> 
> See attached pyext patch, which uses this.
> 
> Ciao




More information about the PD-ot mailing list