how to register private python codecs?

Discussion in 'Python' started by Radovan Garabik, Jul 1, 2003.

  1. 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!
    Radovan Garabik, Jul 1, 2003
    #1
    1. Advertising

  2. 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."
    Mark: "Turn-about is fair play, sir."
    -- _Mirror Dance_, Lois McMaster Bujold
    Steven Taschuk, Jul 1, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Brunel
    Replies:
    3
    Views:
    555
    Richard Brodie
    Jun 28, 2005
  2. Mike Currie

    Python UTF-8 and codecs

    Mike Currie, Jun 27, 2006, in forum: Python
    Replies:
    7
    Views:
    1,142
    Serge Orlov
    Jun 28, 2006
  3. David Hughes
    Replies:
    1
    Views:
    679
    Peter Otten
    Jan 3, 2007
  4. Replies:
    0
    Views:
    717
  5. Karl Knechtel
    Replies:
    2
    Views:
    366
    Walter Dörwald
    Jul 10, 2012
Loading...

Share This Page