Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   how to register private python codecs? (http://www.velocityreviews.com/forums/t319060-how-to-register-private-python-codecs.html)

Radovan Garabik 07-01-2003 02:20 PM

how to register private python codecs?
 

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!

Steven Taschuk 07-01-2003 07:35 PM

Re: how to register private python codecs?
 
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."
staschuk@telusplanet.net Mark: "Turn-about is fair play, sir."
-- _Mirror Dance_, Lois McMaster Bujold



All times are GMT. The time now is 03:10 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.