This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dennis_cs_chuah
Recipients
Date 2004-08-22.23:01:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=700058

More information.

It would appear that the problem is not PKZIP's command line 
archiver as it also happens with ZIP archives created with the 
zipfile module.  Rather the problem has something to do with 
packages in ZIP file.  To reproduce this problem:

1.  Create a sub-directory under c:\Python23 (or whereever 
you installed Python) named test.
2.  Unzip the files from the ZIP archive into the directory.
3.  Start the command line interpretor and enter:

from test import testing

Should display "test"

4.  Exit the command line interpretor.
5.  Delete all *.pyc files from the test directory.
6.  Restart the interpretor and enter the following:

import zipfile
z = zipfile.PyZipFile ('test2.zip', 'w', zipfile.ZIP_DEFLATED)
z.writepy ('test')
z.close()

It should have created a test2.zip archive.

7.  Exit the interpretor.
8.  Verify that test2.zip contains two pyc files inside the test 
folder.
9.  Restart the interpretor and enter the following:

import sys
sys.path.append ('c:\\Python23\\test2.zip')
from test import testing

You should get:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: cannot import name testing

Now, if you created a ZIP archive, with the PY files, it imports 
fine.
History
Date User Action Args
2007-08-23 14:25:30adminlinkissue1011893 messages
2007-08-23 14:25:30admincreate