In article <6cde71c6-5c56-40ea-9849-50fc44e5d...@o14g2000prb.googlegroups.com>,
Santiago Caracol  <santiago.cara...@gmail.com> 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 data often changes, I would like to reimport it every n (e.g.
>10) seconds.

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).
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Programming language design is not a rational science. Most reasoning
about it is at best rationalization of gut feelings, and at worst plain
wrong."  --GvR, python-ideas, 2009-03-01
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to