RosettaCodeData/Task/Bitwise-IO/Python/bitwise-io-3.py

10 lines
168 B
Python
Raw Permalink Normal View History

2013-04-10 16:19:29 -07:00
import sys
import bitio
r = bitio.BitReader(sys.stdin)
while True:
x = r.readbits(7)
2016-12-05 22:15:40 +01:00
if not r.read: # nothing read
2013-04-10 16:19:29 -07:00
break
sys.stdout.write(chr(x))