Re: [Python-Dev] zipimport, round 3 (or would that be that 37?)
Just van Rossum <just@letterror.com> writes:
I'll write a bit about the mechanics tomorrow, but in the meantime I would like to see some test results/bug reports/bug fixes from Windows developers. Please don't start with the full monty (ie. the std lib), try a small test archive first please ;-)
I have managed to apply the patch (import.c) to Python2.2.2 (wasn't too hard) Could you please email me the site.py patch,or post it again?
base64.decodestring(site.patch) binascii.Error: Incorrect padding
Python 2.2.2 (#37, Dec 7 2002, 19:19:43) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information.
import sys print sys.import_hooks [<type 'zipimport.zipimporter'>]
from PIL import Image Traceback (most recent call last): File "<pyshell#2>", line 1, in ? from PIL import Image ImportError: No module named PIL
sys.path.append('C:\Python22\PIL.zip') from PIL import Image now it works
from zipimport import zipimporter arc=zipimporter('C:\Python22\Modules.zip') #Modules.zip - zipped non-package directory m=arc.load_module('module1') ok
arc1=zipimporter('C:\Python22\Modules.zip\Folder1') m=arc1.load_module('fmodule1') ok
Regards Wiktor art@wiktorsadowski.com
participants (1)
-
Wiktor Sadowski