calling a function indirectly

Rajarshi Guha rxg218 at psu.edu
Tue Feb 19 18:13:50 EST 2002


Hi,
  is it possible to have a variable contain a function name, and use the 
variable to call the function? 
An example:

def func:
   some code

funcvar = 'func'

Now use funcvar (somehow!) to call func

Any suggestions would be appreciated.
TIA,

-- 
-------------------------------------------------------------------
Rajarshi Guha                  | email: rajarshi at presidency.com
417 Davey Laboratory           | web  : http://jijo.cjb.net
Department of Chemistry        | ICQ  : 123242928
Pennsylvania State University  | AIM  : LoverOfPanda
-------------------------------------------------------------------
GPG Fingerprint: DCCB 4D1A 5A8B 2F5A B5F6  1F9E CDC4 5574 9017 AF2A 
Public Key     : http://pgp.mit.edu/
-------------------------------------------------------------------
Gravity brings me down.




More information about the Python-list mailing list