Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-15 Thread iMath
Not works on Windows >>> import sys >>> sys.path.insert(0, >>> 'C:/Users/i/Downloads/you-get-0.4.1128.zip/you-get-0.4.1128/src') >>> from you_get import common

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread dieter
\Users\i\Downloads\you-get-0.4.1128.zip\you-get-0.4.1128\src') > >>> from you_get import common > Traceback (most recent call last): > File "", line 1, in > from you_get import common > ModuleNotFoundError: No module named 'you_ge

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
;> from you_get import common Traceback (most recent call last): File "", line 1, in from you_get import common ModuleNotFoundError: No module named 'you_get' >>> >>> import zipimport >>> z=zipimport.zipimporter(r&#x

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
;> from you_get import common Traceback (most recent call last): File "", line 1, in from you_get import common ModuleNotFoundError: No module named 'you_get' >>> >>> import zipimport >>> z=zipimport.zipimporter(r&#x

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-13 Thread dieter
iMath writes: > ... > It seems possible in Python to use `zipimport` to directly use the zip > archive of the module without extraction, I wonder what is the right way to > use `zipimport`. Your problem may come from the following restriction (cited from the Python 2 docu

right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-13 Thread iMath
The same question also posted here https://stackoverflow.com/questions/51820473/right-way-to-use-zipimport-zipimport-zipimporterror-not-a-zip-file I have managed to use [this module][1] without installation - just import it from path to use , import sys url = 'https://exampl

Re: zipimport limited to 65536 files?

2014-05-01 Thread Terry Reedy
rbose mode just shows: import zipimport # builtin # installed zipimport hook # zipimport: found 0 names in spark-assembly-1.0.0-SNAPSHOT-hadoop2.4.0.jar I was messing around and noticed that if I reduce the number of files and directories in the jar to below 65536 then it works: import zipi

zipimport limited to 65536 files?

2014-05-01 Thread Tom Graves
Hello, I am trying to use python (2.6.6) to read a jar file that contains python files.  I'm simply setting PYTHONPATH=  spark-assembly-1.0.0-SNAPSHOT-hadoop2.4.0.jar.   Unfortunately it fails to read the python files from the jar file and if run in verbose mode just shows: import zipi

Re: bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
OK it seems there's a bug in zipimport.c that was fixed in 2.4. I copied across the 2.4 version and after removing a single new error check the rebuilt python 2.3 works fine. There was supposed to be a patch here http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/zipimport.c?r

bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
I'm trying to run some aged software on a new machine which runs Linux app2.reportlab.com 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 GNU/Linux Ubuntu 10.04.2 LTS The software is required to use python 2.3 so first I've had some problems building python itself. Appare

Re: zipimport (.pyd & .so) files.

2010-07-10 Thread King
I think I am trying to open a can of worms. It's better to leave the idea for now. Prashant -- http://mail.python.org/mailman/listinfo/python-list

Re: zipimport (.pyd & .so) files.

2010-07-09 Thread Thomas Jollans
On 07/09/2010 06:36 PM, King wrote: > Hi, > > The 'zipimport' modules can only import (.py & .pyc) files from a zip > file and doesn't support importing .pyd & .so files. Recently I was > examining the code of Py2Exe (python package deployment tool) and I

Re: zipimport (.pyd & .so) files.

2010-07-09 Thread Christian Heimes
> It's strictly for windows platform. I would like to know from expert > python users and linux programmers, how we can achieve similar > functionality on linux platform? I do have limited c/c++ skill sets > but I would love to give a try. I don't know any way to load a shared library from somethi

Re: zipimport (.pyd & .so) files.

2010-07-09 Thread Thomas Jollans
On 07/09/2010 06:36 PM, King wrote: > Hi, > > The 'zipimport' modules can only import (.py & .pyc) files from a zip > file and doesn't support importing .pyd & .so files. Recently I was > examining the code of Py2Exe (python package deployment tool) and I

zipimport (.pyd & .so) files.

2010-07-09 Thread King
Hi, The 'zipimport' modules can only import (.py & .pyc) files from a zip file and doesn't support importing .pyd & .so files. Recently I was examining the code of Py2Exe (python package deployment tool) and I have found that it is using a module 'zipextimporte

Re: Zipimport leaks memory?

2009-08-21 Thread Gabriel Genellina
En Thu, 20 Aug 2009 07:02:26 -0300, ashwin.u@nokia.com escribió: We are currently trying to identify and fix all the memory leaks by just doing Py_Initialize-PyRun_SimpleFile(some simple script)-Py_Finalize and found that there are around 70 malloc-ed blocks which are not freed. One

Zipimport leaks memory?

2009-08-20 Thread ashwin.u....@nokia.com
27;files' is still 1 after Py_Finalize. The zip_directory_cache is the dict that has this 'files' object and this dict is added to the module during zipimport module initialization. This dict is destroyed during _PyModule_Clear(called by PyImport_Cleanup) but the 'files'

Re: how to optimize zipimport

2009-04-04 Thread John Machin
On Apr 4, 7:06 pm, "Coonay.appspot" wrote: > On Apr 2, 6:26 pm, John Machin wrote: [snip] > > > 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 mot

Re: how to optimize zipimport

2009-04-04 Thread Coonay.appspot
mudule ,i import another mudule from a zip , > > > > > > when i call  my mudle method,the module in the zip will be import from > > > > > the zip every time,that slow down the operation, > > > > > > i try to search the some workarodnd or solution bu

Re: how to optimize zipimport

2009-04-02 Thread John Machin
i call  my mudle method,the module in the zip will be import from > > > > the zip every time,that slow down the operation, > > > > > i try to search the some workarodnd or solution but i don't get one, > > i don't use zipimport directly,just like u said i put

Re: how to optimize zipimport

2009-04-02 Thread Gabriel Genellina
En Mon, 30 Mar 2009 09:39:20 -0300, Coonay escribió: On Mar 26, 1:38 pm, John Machin 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"

Re: how to optimize zipimport

2009-03-30 Thread Coonay
a zip , > > > > when i call  my mudle method,the module in the zip will be import from > > > the zip every time,that slow down the operation, > > > > i try to search the some workarodnd or solution but i don't get one, > i don't use zipimport directly,j

how to optimize zipimport

2009-03-26 Thread Coonay
in my mudule ,i import another mudule from a zip , when i call my mudle method,the module in the zip will be import from the zip every time,that slow down the operation, i try to search the some workarodnd or solution but i don't get one, could you help me ? -- http://mail.python.org/mailman/li

Re: how to optimize zipimport

2009-03-25 Thread John Machin
e zip every time,that slow down the operation, > > > i try to search the some workarodnd or solution but i don't get one, 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 "i

Re: how to optimize zipimport

2009-03-25 Thread Coonay
see,the zipimort takes nearly 0.5 second D 03-25 07:53PM 21.374 Loading __main__ I 03-25 07:53PM 21.455 zipimporter('/base/data/home/apps/coonay/1.332322118600950324/ django.zip', '') W 03-25 07:53PM 22.046 appengine_django module On Mar 26, 10:41 am, Coonay wrote: > in my mudule ,i impor

Re: We have zipimport, how about dllimport?

2006-01-28 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > I may be on particularly potent crack, but I was wondering whether it > would make sense to distribute python code in DLLs so that the memory > occupied by the bytecode would be consumed only once even if there were > multiple processes using the same bytecode. Or is ther

Re: We have zipimport, how about dllimport?

2006-01-28 Thread M�ta-MCI
ctypes ? -- http://mail.python.org/mailman/listinfo/python-list

We have zipimport, how about dllimport?

2006-01-27 Thread [EMAIL PROTECTED]
I may be on particularly potent crack, but I was wondering whether it would make sense to distribute python code in DLLs so that the memory occupied by the bytecode would be consumed only once even if there were multiple processes using the same bytecode. Or is there another way to accomplish code

Re: zipimport

2005-05-04 Thread Jonathan Brady
"Gabriele *Darkbard* Farina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a zip file structured like this: > > mymodule.zip\ > module1.py > submodule\ >submodule1.py > > I tried to load submodule.submodule1

zipimport

2005-05-04 Thread Gabriele *Darkbard* Farina
Hi, I have a zip file structured like this: mymodule.zip\ module1.py submodule\ submodule1.py I tried to load submodule.submodule1 using this pice of code: import zipimport z = zipimport.zipimporter("mymodule.zip") z.load_module("submodule.submodule1")

Re: zipimport IOError reading Modules.zip in Mac standalone app

2005-03-07 Thread Just
In article <[EMAIL PROTECTED]>, "Bob Swerdlow" <[EMAIL PROTECTED]> wrote: > We have some users of our application getting error messages like: > IOError: zipimport: can not open file > /Volumes/MyApp/MyApp.app/Contents/Resources/Modules.zip > This onl

zipimport IOError reading Modules.zip in Mac standalone app

2005-03-07 Thread Bob Swerdlow
We have some users of our application getting error messages like: IOError: zipimport: can not open file /Volumes/MyApp/MyApp.app/Contents/Resources/Modules.zip This only happens on our Mac version - the Windows version seems fine. Our build is still using bundlebuilder, which creates