[I18n-sig] codec aliases

Tamito KAJIYAMA kajiyama@grad.sccs.chukyo-u.ac.jp
Wed, 13 Dec 2000 06:29:36 +0900

M.-A. Lemburg wrote:
| > I'm not sure how your work-around works.  How is codec_alias.py
| > used?  Is that intended to be imported in site.py?
| The above scenario should enable you to write one codec,
| say "main_codec.py" which provides the Real Thing and then
| allow you to add aliases to this codec by adding any number
| of additionl redirection codec modules, e.g. "codec_alias_1.py",
| "codec_alias_2.py" which all contain just one line:
| from main_codec import *
| Now, when the search function is queried for e.g.
| "codec-alias-1" it will import codec_alias_1.py and then
| apply the usual processing (even register the additional
| aliases). However, the functionality is provided by
| main_codec.py.

I see.  Thank you for the elaboration.  I've followed exactly
your scenario, and it works!  I've also omitted getaliases()
from each main codec, since that function is no longer used.

This weekend I'll release a new version of the JapaneseCodecs
package that includes the modularized codecs and more.

| BTW: Your email occasionally bounces -- e.g. the last message
| I sent you got back to me (fortunately, you still seem to get the
| i18n-sig message).

Something seems go wrong...  If you don't mind, please remove my
email address (from To: or Cc:) when replying and send messages
only to the list.


KAJIYAMA, Tamito <kajiyama@grad.sccs.chukyo-u.ac.jp>