Brett Cannon wrote:
On 4/26/07, Adam Atlas firstname.lastname@example.org wrote:
I think it would be useful for Python to accept imports of standalone files representing entire packages, maybe with the extension .pyp. A package file would basically be a ZIP file, so it would follow fairly easily from the current zipimport mechanism... its top-level directory would be the contents of a package named by the outer ZIP file. In other words, suppose we have a ZIP file called "package.pyp", and at its top level, it contains "__init__.py" and "blah.py". Anywhere this can be located, it would be equivalent to a physical directory called "package" containing those two files. So you can simply do "import package" as usual, regardless of whether it's a directory or a .pyp.
So basically zipimport, but instead of putting the zip file on sys.path the zip file exists in a directory on sys.path and the file name acts at the top-level package name? I like the idea as making stuff just work more easily by dropping into some common place and not having to muck with the import settings would be nice.
I like that too. + 1
I really dislike scattering a projects files around.
And conversely, I really dislike combining files from different sources.