List of available codecs

Bengt Richter bokr at oz.net
Fri May 9 12:50:03 EDT 2003


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

>bokr at oz.net (Bengt Richter) writes:
>
>> How close is
>>     import codecs
>>     codecList = [x for x in dir(codecs) if x.find('_decode')!=-1 or x.find('_encode')!=-1]
>> ?
>
>Almost useless. People would expect "koi8-r", "iso-8859-2", "cp1252",
>etc in the result, as these are all strings you can pass to codecs.lookup.
>
D'oh ;-/

Regards,
Bengt Richter




More information about the Python-list mailing list