Message264906
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. |
|
Date |
User |
Action |
Args |
2016-05-05 12:40:02 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, xdegaye, python-dev, Alex.Willmer |
2016-05-05 12:40:02 | serhiy.storchaka | set | messageid: <1462452002.32.0.96838623763.issue26918@psf.upfronthosting.co.za> |
2016-05-05 12:40:02 | serhiy.storchaka | link | issue26918 messages |
2016-05-05 12:40:02 | serhiy.storchaka | create | |
|