Building a function call?
- From: Francois De Serres <fdeserres@xxxxxxx>
- Date: Wed, 13 Jul 2005 14:35:20 +0200
Hiho,
Having a string: "dothat" and a tuple: (x, y) 1. What's the best way to build a function call like: dothat(x,y)?
Assuming dothat is def'd in the same module,
2. is: eval("dothat(x,y)", None, (('x', 100), ('y', 200)))
the right way to have it executed?If dothat is def'd in another module: 3. what would be the right way to initialize the globals to pass to eval ?
TIA, Francois
.
- Follow-Ups:
- Re: Building a function call?
- From: Larry Bates
- Re: Building a function call?
- From: Duncan Booth
- Re: Building a function call?
- From: Roland Heiber
- Re: Building a function call?
- Prev by Date: Re: math.nroot [was Re: A brief question.]
- Next by Date: Re: Building a function call?
- Previous by thread: Console logging/output for DocXMLRPCServer
- Next by thread: Re: Building a function call?
- Index(es):