On 08/05/2006, at 22:16, Robin Haswell wrote:
> > Jorge Godoy wrote: >> I prefer spending a bit more of my time to make users >> happy. > > Good to know you'll never write for the gnome project then ;-) > > (Sorry) > > On a more constructive note, this might sound silly but can't we > just do this by performing a > regular expression on quickstarted source? > > Try this: > > $ cat controllers.py|sed -r 's/^(\s+)@([a-z_]+\(.*\))\s*$/\1[\2]/i' > > It only works on single-line decorators (multiline might be a > little beyond my regexp skill) but it > seems to do the job. I think the experession for a python symbol - > [a-z_] - is a little off, but > someone can easily sort that out. You could even replace it with [^ > (] . > > Of course that regexp is fine to just dump in to re.compile() - > re.compile(r's/^(\s+)@([a-z_]+\(.*\))\s*$/\1[\2]/', re.I) > > Quick question - why does the "[expose(...)]" work? Because of PJE's Magic Wand ;) http://trac.turbogears.org/turbogears/ticket/728 Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

