A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-July/016282.html below:

[Python-Dev] zipfiles on sys.path

[Python-Dev] zipfiles on sys.path [Python-Dev] zipfiles on sys.pathJust van Rossum just@letterror.com
Thu, 26 Jul 2001 00:11:06 +0200
Jack Jansen wrote:

> > - The __path__ vrbl in a package 'foo.bar' loaded from zipfile.zip
> >   will have the value ['zipfile.zip!foo/bar'] and this same syntax can
> >   also be used when adding entries to sys.path and __path__.
> 
> __path__ is set to the package name. I'm not sure of the exact
> rationale for this (Just did the package support) but it seems to work
> fine. 

I don't know the rationale either (or at least: not anymore ;-), I just copied
the behavior of frozen packages (as in freeze.py) from import.c.
PyImport_ImportFrozenModule() contains this snippet:

    if (ispackage) {
        /* Set __path__ to the package name */
        ...


Just



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4