0001 """ Python 'undefined' Codec 0002 0003 This codec will always raise a ValueError exception when being 0004 used. It is intended for use by the site.py file to switch off 0005 automatic string to Unicode coercion. 0006 0007 Written by Marc-Andre Lemburg (mal@lemburg.com). 0008 0009 (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. 0010 0011 """ 0012 import codecs 0013 0014 ### Codec APIs 0015 0016 class Codec(codecs.Codec): 0017 0018 def encode(self,input,errors='strict'): 0019 raise UnicodeError, "undefined encoding" 0020 0021 def decode(self,input,errors='strict'): 0022 raise UnicodeError, "undefined encoding" 0023 0024 class StreamWriter(Codec,codecs.StreamWriter): 0025 pass 0026 0027 class StreamReader(Codec,codecs.StreamReader): 0028 pass 0029 0030 ### encodings module API 0031 0032 def getregentry(): 0033 0034 return (Codec().encode,Codec().decode,StreamReader,StreamWriter) 0035
Generated by PyXR 0.9.4