Jul-07-2020, 06:58 AM
Can I read from the stdin in binary? the function input() and os.stdin.read() both require "utf-8". I want to do this because my python homework testing framework use "./xxx.py < input.txt" to run my python script, but the input.txt may contain some random binary value. How can I handle this ?