282 return codecs.decode(txt, self.__encoding) |
282 return codecs.decode(txt, self.__encoding) |
283 |
283 |
284 # Inject into the __builtin__ dictionary |
284 # Inject into the __builtin__ dictionary |
285 __builtin__.open = open |
285 __builtin__.open = open |
286 |
286 |
287 if __name__ == '__main__': |
|
288 fp = open('compatibility_fixes.py', encoding='latin1') |
|
289 print(fp.read()) |
|
290 fp.close() |
|
291 |
|
292 with open('compatibility_fixes.py', encoding='UTF-8') as fp: |
|
293 rlines = fp.readlines() |
|
294 print(rlines[-1]) |
|
295 |
|
296 # |
287 # |
297 # eflag: FileType = Python2 |
288 # eflag: FileType = Python2 |
298 # eflag: noqa = M702 |
289 # eflag: noqa = M702 |