[Email-SIG] which email package for Python 2.3 / 2.4 / 2.5?

Bill Janssen janssen at parc.com
Mon Nov 13 18:07:26 CET 2006


> > That's not good.  It means I have to do wierd and wonderful -- but
> > mostly fragile -- sys.path hacking before trying to import email.  Now
> > I'm back to wishing that the 3.x and 4.x email packages had a support
> > system for backwards-compatible APIs.
> 
> It's one reason why Mailman for example installs email x.y in its own  
> pythonlib directory, and sets its sys.path to check there first.
> 
> However, this is a more general problem with Python, so I really  
> think it needs to be solved there.

To some extent, it's already solved (thanks to Martin).  If the
installer for email installed an "email.pth" file in the installation
directory (which, absent any configuration switches, is the regular
"site-packages" directory) which contained

   import sys; sys.path.insert(0, <path>)

where <path> is the installation directory, that directory would be
scanned before the regular library version.  If you did this, for the
general case where there are no configuration switches, you'd want to
install email in an empty subdirectory of site-packages, I'd think.

Bill


More information about the Email-SIG mailing list