Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to register private python codecs?

Reply
Thread Tools

how to register private python codecs?

 
 
Radovan Garabik
Guest
Posts: n/a
 
      07-01-2003

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!
 
Reply With Quote
 
 
 
 
Steven Taschuk
Guest
Posts: n/a
 
      07-01-2003
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().

--
Steven Taschuk Aral: "Confusion to the enemy, boy."
http://www.velocityreviews.com/forums/(E-Mail Removed) Mark: "Turn-about is fair play, sir."
-- _Mirror Dance_, Lois McMaster Bujold

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Re: How to keep your private files private HMV Computer Support 0 02-21-2006 04:54 PM
Public Data in Private Class or Private Data in Public Class? DaveLessnau C++ 3 05-16-2005 06:53 PM
RE: Why I use private variables (WAS: RE:"private" variablesa.k.a. name mangling?) Jeremy Bowers Python 3 01-24-2005 10:52 PM
Should 'public virtual' always become 'private virtual'? & using private inheritance qazmlp C++ 19 02-04-2004 12:37 AM



Advertisments