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
iMath writes: > ... > I think someone gives the true reason caused the exception here > https://stackoverflow.com/a/51821910/1485853 > > Thanks to his explanation , I extracted the zip archive and then add the > extracted to a zip archive using Bandizip, this time > `zipimport.zipimporter(r'C:

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

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

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

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

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 documentation of `zipimport