template = Template(templateFile, searchList) content = template.respond() # write content to file and close file
When I run this code I see the python process consuming an ever growing amount of memory (I see this in the "Mem usage" column in the Windows task manager and the SZ column of ps -l on Linux). Looking at the methods of the Template class I noticed a promising method called shutdown(). And indeed, when I add: template.shutdown() ... to the code above, memory usage remains low and constant. At the time of writing, template.shutdown() was not documented in the Users' Guide. -- RenePijlman - 25 Nov 2003 On Fri, Mar 20, 2009 at 10:07 AM, paul jobs <[email protected]> wrote: > i modified render_cheetah in template.py > as #includes doesnt seem to be working > it is named newrender_cheetah > > Can you please let me know if it is good so i can submit to Webpy authors > > > On Fri, Mar 20, 2009 at 9:50 AM, Brent Pedersen <[email protected]>wrote: > >> >> thats a cheetah question: maybe this: >> >> http://www.cheetahtemplate.org/docs/users_guide_html/users_guide.html#errorHandling.errorCatcher >> or this: >> http://www.cheetahtemplate.org/docs/users_guide_html/users_guide.html#SECTION000670000000000000000 >> >> On Fri, Mar 20, 2009 at 9:26 AM, paul jobs <[email protected]> wrote: >> > Brent >> > Thanks >> > this works >> > but there a lot of templates that we alredy have in like 100s i think >> > Would it be possible to set a default NameMapper >> > Thanks >> > On Fri, Mar 20, 2009 at 8:37 AM, Brent Pedersen <[email protected]> >> wrote: >> >> >> >> instead of sending in your variables directly, you can put them all in >> a >> >> dict: >> >> render.index(d=dict(name=name)) >> >> >> >> then use d.get('name, '') >> >> >> >> in the template. >> >> >> >> On Fri, Mar 20, 2009 at 2:31 AM, <[email protected]> wrote: >> >> > >> >> > >> >> > is it possible to not throw exceptions if undefined variables are >> >> > accessed >> >> > in cheetah >> >> > >> >> > > >> >> > >> >> >> >> >> > >> > >> > >> > -- >> > BidEgg - Worlds best low price Auction site >> > http://bidegg.com >> > >> > BidEgg - Worlds best low price Auction site >> > >> > > >> > >> >> >> >> > > > -- > BidEgg - Worlds best low price Auction site > http://bidegg.com > > BidEgg - Worlds best low price Auction site > -- BidEgg - Worlds best low price Auction site http://bidegg.com BidEgg - Worlds best low price Auction site --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
