How do you set an app global variable? 2009/1/2 hhsuper <[email protected]>: > yeah, use web.ctx set global variable within a request, not between > multi-request(user session do it), also not for the application global > > On Fri, Jan 2, 2009 at 1:20 AM, Aaron Swartz <[email protected]> wrote: >> >> If you want variables to be global to a request, use web.ctx. >> >> On Jan 1, 2009 5:25 AM, "Monty808" <[email protected]> wrote: >> >> >> Hi, >> >> I am trying to create two global variable. One is a datetime called >> start_time and the other is a dictionary. For each request I want to >> add values to the dictionary and I want to find the difference between >> the start_time var and the current tme. >> >> >> I have a if condition that will 1) set the start_time to the current >> time if a number of seconds pass OR reset the dictionary to {} i.e. >> empty. >> Question, how to I create global vars for the start_time and the >> dictionary in webpy? When I try to set the current time to start_time >> or try to empty the dictionary I get errors about that the global vars >> don't exist. >> >> Thanks >> >> >> >> > > > > -- > Su zhaohui 苏召辉 > > > >
-- Javier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
