Re: [web2py] Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
Thanks. In conjunction with routes could supply a solution (shortening the urls). I think I should rethink the payoff (see my reply to Massimo regarding my goals). Thanks, Miguel On Wed, Jul 6, 2011 at 3:12 PM, Jonathan Lundell wrote: > On Jul 6, 2011, at 1:23 AM, Miguel Lopes wrote: > > I'm exp

Re: [web2py] Metaprogramming in controller

2011-07-06 Thread Jonathan Lundell
On Jul 6, 2011, at 1:23 AM, Miguel Lopes wrote: > I'm experimenting with dynamically generating functions, aka 'actions' in > controllers. However, I've been unsuccessful. I can use exec and closures > successfully in regular Python code, but I can't make it work with web2py. > Any thoughts on h

[web2py] Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
I'm experimenting with dynamically generating functions, aka 'actions' in controllers. However, I've been unsuccessful. I can use exec and closures successfully in regular Python code, but I can't make it work with web2py. Any thoughts on how to achieve this? A closure example - FAILS in web2py: