From 8cc612219e693f3d4348167440d2d3a894860ee5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 28 Oct 2012 17:25:23 +0100 Subject: utf-8 --- auto-auto-complete.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/auto-auto-complete.py b/auto-auto-complete.py index b3f9985..eaa941d 100644 --- a/auto-auto-complete.py +++ b/auto-auto-complete.py @@ -1,5 +1,30 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- + + + +''' +Hack to enforce UTF-8 in output (in the future, if you see anypony not using utf-8 in +programs by default, report them to Princess Celestia so she can banish them to the moon) + +@param text:str The text to print (empty string is default) +@param end:str The appendix to the text to print (line breaking is default) +''' +def print(text = '', end = '\n'): + sys.stdout.buffer.write((str(text) + end).encode('utf-8')) + +''' +stderr equivalent to print() + +@param text:str The text to print (empty string is default) +@param end:str The appendix to the text to print (line breaking is default) +''' +def printerr(text = '', end = '\n'): + sys.stderr.buffer.write((str(text) + end).encode('utf-8')) + + if __name__ = '__main__': print('I am so sorry, this is not implement yet.') + -- cgit v1.2.3-70-g09d2