[Tutor] Still Trying to Understand GAE

Kent Johnson kent37 at tds.net
Thu Sep 17 15:13:14 CEST 2009


On Thu, Sep 17, 2009 at 8:38 AM, admin at gg-lab.net <admin at gg-lab.net> wrote:
> Thankyou all, you're very precious for me.
>
> yeah it seems the development webserver (and the production one) are
> importing modules in a non-standard way.
>
> I absolutely don't understand this choice. Why import everything
> everytime? Don't you think it makes scripts much more slow?

My guess is that they are importing what they need. It does impact
startup but hey, if you need it, you need it.

Try this for comparison: Start Python from a command line, then
In [5]: import sys

In [6]: len(sys.modules)
Out[6]: 323

I have IPython loaded so this number may be larger than yours. In
Python 3, with no IPython, I get
>>> import sys
>>> len(sys.modules)
47

So my advice is, don't worry about it.

Kent


More information about the Tutor mailing list