thanks Bruno for the quick reply. blastoff() was only an example function; note that request.args[0] can contain other function names.
so, rather than x = *_*blastoff(**request.vars) how can I use the value in request.args[0] in each call? ie... I'm writing a dispatch function that will call the specified function defined by request.args[0] I tried request.args[0](**request.vars) but it didn't work (and was a silent fail at that) On 17 September 2012 18:39, Bruno Rocha <[email protected]> wrote: > > The better way is > > def *_*blastoff(seconds, confirm): > # do whatever > > def blastoff(): > try: > x = *_*blastoff(**request.vars) > except Exception: > x = "error calling function, vars not passed or vars is wrong" > return dict(x=x) > > > > On Mon, Sep 17, 2012 at 2:33 PM, Carl <[email protected]> wrote: > >> I've got a request object coming to my Web2py app's controller function. >> >> request.args[0] is another function name e.g., blastoff >> request.vars are parameters e.g., Storage object: {'seconds':10, >> 'confirm' : 'okay'} >> >> how can I call blastoff with the parameters such that I can write >> blastoff as... >> >> def blastoff(seconds, confirm): ... >> >> -- >> >> >> >> > > > -- > > > > --

