def filebytes(fileobj, buffersize=1024):
 buff = fileobj.read(buffersize)
 while buff:
  for byte in buff:
   (yield byte)
  buff = fileobj.read(buffersize)

def filebytes ( fileobj , buffersize = 1024 ) : buff = fileobj . read ( buffersize ) while buff : for byte in buff : ( yield byte ) buff = fileobj . read ( buffersize )
convenience for iterating over the bytes in a file .