[Python-Dev] Another approach for the import mechanism

Moore, Paul Paul.Moore@atosorigin.com
Fri, 6 Dec 2002 10:13:24 -0000


Samuele Pedroni wrote:
> btw for single packages (once you can put zipfiles in sys.path
> or __path__) you can achieve this with __path__
>
> package/
>   __init__.py
>
>     __path__[0] =3D os.path.join(__path__[0],'package.zip')
>
>   package.zip

Of course, if __path__[0] was originally an object, this would
break...

I think that the objects-on-sys.path issue has now been resolved,
but this probably acts as a reasonable "real world" example of what
needs to be supported. (Unless I've misunderstood things again :-))

Paul.