utf_7.py 576 B

1234567891011121314151617181920212223242526
  1. """ Python 'utf-7' Codec
  2. Written by Brian Quinlan ([email protected]).
  3. """
  4. import codecs
  5. ### Codec APIs
  6. class Codec(codecs.Codec):
  7. # Note: Binding these as C functions will result in the class not
  8. # converting them to methods. This is intended.
  9. encode = codecs.utf_7_encode
  10. decode = codecs.utf_7_decode
  11. class StreamWriter(Codec,codecs.StreamWriter):
  12. pass
  13. class StreamReader(Codec,codecs.StreamReader):
  14. pass
  15. ### encodings module API
  16. def getregentry():
  17. return (Codec.encode,Codec.decode,StreamReader,StreamWriter)