diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-10-28 17:25:23 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-10-28 17:25:23 +0100 |
commit | 8cc612219e693f3d4348167440d2d3a894860ee5 (patch) | |
tree | 08cc60b59c8ef56ff44a0f4e4a6c7c65329e66fe | |
parent | main python 3 script definition (diff) | |
download | auto-auto-complete-8cc612219e693f3d4348167440d2d3a894860ee5.tar.gz auto-auto-complete-8cc612219e693f3d4348167440d2d3a894860ee5.tar.bz2 auto-auto-complete-8cc612219e693f3d4348167440d2d3a894860ee5.tar.xz |
utf-8
-rw-r--r-- | auto-auto-complete.py | 25 |
1 files changed, 25 insertions, 0 deletions
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.') + |