unicode_internal.py 672 B

123456789101112131415161718192021222324252627282930
  1. """ Python 'unicode-internal' Codec
  2. Written by Marc-Andre Lemburg ([email protected]).
  3. (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
  4. """
  5. import codecs
  6. ### Codec APIs
  7. class Codec(codecs.Codec):
  8. # Note: Binding these as C functions will result in the class not
  9. # converting them to methods. This is intended.
  10. encode = codecs.unicode_internal_encode
  11. decode = codecs.unicode_internal_decode
  12. class StreamWriter(Codec,codecs.StreamWriter):
  13. pass
  14. class StreamReader(Codec,codecs.StreamReader):
  15. pass
  16. ### encodings module API
  17. def getregentry():
  18. return (Codec.encode,Codec.decode,StreamReader,StreamWriter)