Serhiy Storchaka added the comment: The equivalent of used "tr" command is .upper(), not .swapcase().
Instead of the loop for s in sys.stdin.read(): sys.stdout.write(s.upper()) you can write just sys.stdout.write(sys.stdin.read().upper()) But actually the loop is needed for testing purpose. while True: b = sys.stdin.buffer.read(1) if not b: break sys.stdout.buffer.write(b.upper()) And sys.executable should be escaped for the case of spaces or other special symbols in the path. All this complicates tests too much. I prefer to skip some tests on Android. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26918> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com