Re: reimport module every n seconds

2011-03-20 Thread John Nagle
On 3/17/2011 3:53 PM, Aahz wrote: In article<753e9884-60eb-43cf-a647-12b29ed28...@y31g2000prd.googlegroups.com>, Santiago Caracol wrote: Don't do that. =A0;-) =A0I suggest using exec instead. =A0However, I wo= uld be surprised if import worked faster than, say, JSON (more precisely, I doubt t

Re: reimport module every n seconds

2011-03-17 Thread Aahz
In article <753e9884-60eb-43cf-a647-12b29ed28...@y31g2000prd.googlegroups.com>, Santiago Caracol wrote: >>> Don't do that. =A0;-) =A0I suggest using exec instead. =A0However, I wo= >uld be >>> surprised if import worked faster than, say, JSON (more precisely, I >>> doubt that it's enough faster t

Re: reimport module every n seconds

2011-02-18 Thread Santiago Caracol
> > Don't do that.  ;-)  I suggest using exec instead.  However, I would be > > surprised if import worked faster than, say, JSON (more precisely, I > > doubt that it's enough faster to warrnat this kludge). > > I'm with Aahz.  Don't do that. > > I don't know what you're doing, but I suspect an eve

Re: reimport module every n seconds

2011-02-17 Thread Roy Smith
In article , a...@pythoncraft.com (Aahz) wrote: > In article > <6cde71c6-5c56-40ea-9849-50fc44e5d...@o14g2000prb.googlegroups.com>, > Santiago Caracol wrote: > > > >a server program of mine uses data which are compiled to a Python > >module for efficiency reasons. In some module of the server

Re: reimport module every n seconds

2011-02-17 Thread Aahz
In article <6cde71c6-5c56-40ea-9849-50fc44e5d...@o14g2000prb.googlegroups.com>, Santiago Caracol wrote: > >a server program of mine uses data which are compiled to a Python >module for efficiency reasons. In some module of the server program I >import the data: > >from data import data > >As the

Re: reimport module every n seconds

2011-02-17 Thread Jean-Michel Pichavant
Santiago Caracol wrote: Hello, a server program of mine uses data which are compiled to a Python module for efficiency reasons. In some module of the server program I import the data: from data import data As the data often changes, I would like to reimport it every n (e.g. 10) seconds. Unfor

reimport module every n seconds

2011-02-17 Thread Santiago Caracol
Hello, a server program of mine uses data which are compiled to a Python module for efficiency reasons. In some module of the server program I import the data: from data import data As the data often changes, I would like to reimport it every n (e.g. 10) seconds. Unfortunately, it is rather dif