how to register private python codecs?

  • Thread starter Radovan Garabik
  • Start date
R

Radovan Garabik

I am developing and application that makesheavy use of (my own)
codecs not distributed with python (i.e. unicode(text, 'kamenicky'))
I put the codec into file kamenicky.py, placed the file into
/usr/lib/python/encodings,
but now I want to distribute my application, and I assume that
users won't always have the possibility of copying files into
/usr/lib/python/encodings.
Is there a (simple) way how to register this encoding so that the
file "kamenicky.py" can be in (let's say) current directory?

TIA

--
-----------------------------------------------------------
| Radovan Garabík http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__ garabik @ kassiopeia.juls.savba.sk |
-----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!
 
S

Steven Taschuk

Quoth Radovan Garabik:
[...]
Is there a (simple) way how to register this encoding so that the
file "kamenicky.py" can be in (let's say) current directory?

See codecs.register().
 

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
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top