Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > what module is this? if it takes 5.5 seconds to import a single module, > something isn't quite right. Ok, I know it sounds bad but it has a good purpose! Basically it provides access to about 100mb of data. It serves as a cache of QuickBoo

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Fredrik Lundh
Gregory Piñero wrote: >> several seconds? sounds bad. what does the following script print on >> your machine? >> >> import time, subprocess, sys >> >> t0 = time.time() >> for i in range(10): >> subprocess.call([sys.executable, "-c", "pass"]) >> print

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > several seconds? sounds bad. what does the following script print on > your machine? > > import time, subprocess, sys > > t0 = time.time() > for i in range(10): > subprocess.call([sys.executable, "-c", "pas

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Fredrik Lundh
Gregory Piñero wrote: > 1. Will "from somemodule import onething" take as long to start up as > import somemodule? yes; "from x import y" does an ordinary import of "x" under the hood. > 2. Is there anyway I can get at onething more quickly? not really, unless you're willing/able to refactor th

Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
Hey Folks, Some import questions that a search didn't turn up for me. 1. Will "from somemodule import onething" take as long to start up as import somemodule? 2. Is there anyway I can get at onething more quickly? 3. If I put an import statement hidden away in some function, will Python only do t