- Got rid of newmodule.c
[python/dscho.git] / Lib / encodings / utf_16_le.py
blobaa9d6f5b1d2670898686b3abb9952ce822127a18
1 """ Python 'utf-16-le' Codec
4 Written by Marc-Andre Lemburg (mal@lemburg.com).
6 (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
8 """
9 import codecs
11 ### Codec APIs
13 class Codec(codecs.Codec):
15 # Note: Binding these as C functions will result in the class not
16 # converting them to methods. This is intended.
17 encode = codecs.utf_16_le_encode
18 decode = codecs.utf_16_le_decode
20 class StreamWriter(Codec,codecs.StreamWriter):
21 pass
23 class StreamReader(Codec,codecs.StreamReader):
25 def readline(self, size=None):
26 raise NotImplementedError, '.readline() is not implemented for UTF-16-LE'
28 ### encodings module API
30 def getregentry():
32 return (Codec.encode,Codec.decode,StreamReader,StreamWriter)