[Python-Dev] Import redesign (was: Python 1.6 status)

James C. Ahlstrom jim@interet.com
Mon, 22 Nov 1999 12:25:46 -0500


Gordon McMillan wrote:

> [JimA]
> > Think about multiple packages in multiple zip files.  The zip
> > files store file directories.  That means we would need a
> > sys.zippath to search the zip files.  I don't want another
> > PYTHONPATH phenomenon.
> 
> What if sys.path looked like:
>  [DirImporter('.'), ZlibImporter('c:/python/stdlib.pyz'), ...]

Well, that changes the current meaning of sys.path.
 
> > > > I suggest that archive files MUST be put into a known
> > > > directory.
> 
> No way. Hard code a directory? Overwrite someone else's
> Python "standalone"? Write to a C: partition that is
> deliberately sized to hold nothing but Windows? Make
> network installations impossible?

Ooops.  I didn't mean a known directory you couldn't change.
But I did mean a directory you shouldn't change.

But you are right.  The directory should be configurable.  But
I would still like to see a highly encouraged directory.  I
don't yet have a good design for this.  Anyone have ideas on an
official way to find library files?

I think a Python library file is a Good Thing, but it is not useful if
the archive can't be found.

I am thinking of a busy SysAdmin with someone nagging him/her to
install Python.  SysAdmin doesn't want another headache.  What if
Python becomes popular and users want it on Unix and PC's?  More
work!  There should be a standard way to do this that just works
and is dumb-stupid-simple.  This is a Python promotion issue.  Yes
everyone here can make sys.path work, but that is not the point.

> The official Windows solution is stuff in registry about app
> paths and such. Putting the dlls in the exe's directory is a
> workaround which works and is more managable than the
> official solution.

I agree completely.
 
> > > > We should also have the ability to append archive files to
> > > > the executable or a shared library assuming the OS allows
> > > > this
> 
> That's a handy trick on Windows, but it's got nothing to do
> with Python.

It also works on Linux.  I don't know about other systems.
 
> Flexibility. You can put Christian's favorite Einstein quote here
> too.

I hope we can still have ease of use with all this flexibility.
As I said, we need to promote Python.
 
Jim Ahlstrom