Re: [Zope] dynamically call zsqlmethod

2009-11-25 Thread Andreas Jung
getattr(context, column)()? -aj On Wed, Nov 25, 2009 at 19:53, Garry Saddington ga...@schoolteachers.co.ukwrote: I am passing a variable named 'column' to the following script and trying to fill a select box with the result of a zsqlmethod chosen dynamically using this variable. print

Re: [Zope] dynamically call zsqlmethod

2009-11-25 Thread Jeff Peterson
IF it's a variable passed to the script wouldn't you simply access it as 'column'? Also, is it a variable or a function? Or is the variable the name of a function somewhere? If it's the former just call it: column(). If it's the latter, Andreas should be correct, getattr(context, column)() or

Re: [Zope] dynamically call zsqlmethod

2009-11-25 Thread Garry Saddington
Jeff Peterson wrote: IF it's a variable passed to the script wouldn't you simply access it as 'column'? Also, is it a variable or a function? Or is the variable the name of a function somewhere? If it's the former just call it: column(). If it's the latter, Andreas should be correct,