would be nice: import from archive

Alex Martelli aleaxit at yahoo.com
Sat Aug 28 02:44:19 EDT 2004


Dan Perl <dperl at rogers.com> wrote:

> I thought about submitting a recipe but I couldn't think of a way to use it
> in a good code 'snippet'.  I am using the zipimport feature now to save
> several configuration files together in a zip file (so I can have many
> configurations saved in a convenient format, better than a new directory for
> each configuration).  That would be more of an example for using multiple
> configurations but, anyway, it doesn't make for a short, well-contained
> example.  Sorry, Alex.

Alas!  Your analysis seems spot-on and is pretty close to why I haven't
done a zipimport recipe myself -- it's a very useful feature but it's
not easy to think of a way to show it off in a recipe that's just how
recipes should be -- short, self-contained, readable.  We can still hope
that somebody else does think of something...

> 
> BTW, there are two books on Python that I keep on my Safari bookshelf:
> 'Python Cookbook' and 'Learning Python'.  So my jab was made will all the
> respect I can muster.  I am really looking forward to the second edition,
> recipe on zipimport or not.

I did take your friendly jab as just that, friendly and pleasant, and
answered in just the same vein.  (I do hope the reason the Nutshell
isn't on your Safari bookshelf is that you have the paper copy always at
hand, right?-)


Alex



More information about the Python-list mailing list