This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

TECManager

Pythonic wrapper for the Text to Unicode functionality of Apple's Text Encoding Conversion Manager.

status

TECManager is at it's second release, version 0.2. It now supports Python text encodings (replaces the built-in mac specific codecs and adds new ones), and its usage is pretty much transparent after the module has been imported.

examples

   1 >> import TECManager as TM
   2 >> # convert a macRoman bullet to a unicode bullet
   3 >> '\xa5'.decode('mac_roman')
   4 u'\u2022'
   5 >> # convert a smHebrew HEBREW POINT QAMATS, alternate form "qamats qatan"
   6 >> '\xde'.decode('mac_hebrew')
   7 u'\u05b8\uf87f'
   8 >> # create a new 'mac_turkish' encoding, which is a modified smRoman script.
   9 >> TM.tec_codecs.createModule('encodings.mac_turkish', TM.getTextEncoding(script=TM.smRoman, language=TM.langTurkish, region=TM.verTurkey))
  10 >> '\xa5'.decode('mac_turkish')
  11 u'\u2022'

links

http://undefined.org/python/#TECManager


2026-02-14 16:09