[Python-Dev] Getting a list of registered codecs

M.-A. Lemburg mal at egenix.com
Tue Apr 30 11:42:49 CEST 2013

On 30.04.2013 11:15, Paul Moore wrote:
> Before I raise a bug for this, can someone confirm if I've simply missed
> something? I don't see any way, either in the docs or in the helpstrings
> from the codecs, of listing the codecs that have been registered.
> FWIW, I picked this up when I was looking at writing a simple encoding
> converter, and I wanted to add a flag to list what conversions were
> supported.
> Paul.

It would be possible to get a list of registered codec search functions,
but there's no API to ask the search functions for a list of supported

If you're just looking for a list of codecs supported by the stdlib
encodings module, you can use the helper that Steven mentioned, or
you can scan the encoding aliases dictionary for codecs (but this will
not necessarily return all available codecs).

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Apr 30 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
2013-04-30: Released eGenix PyRun 1.2.0 ...       http://egenix.com/go44
2013-04-17: Released eGenix mx Base 3.2.6 ...     http://egenix.com/go43

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-Dev mailing list