Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def sbytes(stream):
  2.     """Generator to iterate over bytes in a stream."""
  3.     byte = stream.read(1)
  4.     while len(byte) > 0:
  5.         yield ord(byte)
  6.         byte = stream.read(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement