Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: Programmatically discovering encoding types supported by codecs module
Gabriel Genellina
3/24/2010 5:39:00 PM
En Wed, 24 Mar 2010 13:17:16 -0300, <python@bdurham.com> escribió:
> Is there a way to programmatically discover the encoding types
> supported by the codecs module?
>
> For example, the following link shows a table with Codec,
> Aliases, and Language columns.
>
http://docs.python.org/library/codecs.html#standard...
>
> I'm looking for a way to programmatically generate this table
> through some form of module introspection.
After looking at how things are done in codecs.c and encodings/__init__.py
I think you should enumerate all modules in the encodings package that
define a getregentry function.
Aliases come from encodings.aliases.aliases.
--
Gabriel Genellina
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Programmatically discovering encoding types supported by codecs module
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password