[Zope] calling (SQL) methods dynamically from External methods

Andrew Kenneth Milton akm@mail.theinternet.com.au
Mon, 21 Aug 2000 13:32:52 +1000


+-------[ Philipp Auersperg ]----------------------
| 
| What I want to do is calling a SQL method given its
| name as string, so I first have to get the method out of
| the self.__dict__ and then call it. I need that for calling
| the SQL methods dynamically for example out of an URL
| string.

    realConnection=getattr(self,connectionId)
    realConnection().query(query_in_a_string)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd          |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068    |akm@theinternet.com.au|