how to optimize zipimport

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Apr 2 04:18:09 EDT 2009


En Mon, 30 Mar 2009 09:39:20 -0300, Coonay <flankw at gmail.com> escribió:
> On Mar 26, 1:38 pm, John Machin <sjmac... at lexicon.net> wrote:

>> Why are you explicitly using the zipimport module? In other words, why
>> don't you put the full path of the zip file in sys.path and then just
>> use the normal "import module_in_the_zip" mechanism? Note that this
>
> i found the the module in the zip reloaded  everytime the code is
> called,i mean, say ,first time it take me 1 second to call a method in
> the zip,but it take another 1 second to call the mothod for another
> time ,and so on

Uh? Which Python version?
Once a module is imported, it isn't loaded again, even from a zip file.
Surely there is another reason for the delay, not the import itself.

-- 
Gabriel Genellina




More information about the Python-list mailing list