how to reference custom codec in a package?

S

Skip Montanaro

I wrote a simple codec which strips accents from latin-1 characters (e.g.,
maps 'é' to 'e'). If it lives in a package how do I refer to it? For
example, what should this statement look like

x = unicode(x, "latin1").encode("latscii")

if latscii.py lives in the spambayes package? This seems to work:

x = unicode(x, "latin1").encode("spambayes.latscii")

but is that the right way to do it?

Thx,

Skip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top