[I18n-sig] Intro + Encoding names issue

M.-A. Lemburg mal@lemburg.com
Fri, 26 Oct 2001 23:06:54 +0200


Matt Gushee wrote:
> 
> So the ideal would be a solution that allowed codecs developers to
> maintain separate packages, but have their component modules "plugged
> in" to the encodings namespace on installation.
> 
> Apparently the above is impossible or at least very difficult with
> Distutils. Maybe a workable compromise would be to have some sort of
> codecs installation utility that would let end users, in one simple
> step, insert a set of codecs into the main encodings namespace.

Just put an application specific codec search function into 
Ft.__init__ and have this search function do the aliasing you wish 
to have in place.

The encodings.__init__ search function will do the trick for
packaged codecs. If you want to tweak the "top-level" codec
namespace, you'll really have to provide your own search function.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/