List of available codecs

Bengt Richter bokr at oz.net
Wed May 7 18:09:55 EDT 2003


On 07 May 2003 20:31:09 +0200, martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) wrote:

>"Gilles Lenfant" <glenfant at NOSPAM.bigfoot.com> writes:
>
>> I'm some stuck with the Unicode and codecs stuff.
>> I need to have a list or tuple of available codecs.
>
>Unfortunately, this is not supported. I agree it would be desirable to
>have.
>
How close is
    import codecs
    codecList = [x for x in dir(codecs) if x.find('_decode')!=-1 or x.find('_encode')!=-1]
?

Regards,
Bengt Richter




More information about the Python-list mailing list