On Thu, Sep 17, 2009 at 8:38 AM, ad...@gg-lab.net <ad...@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
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to