#NEWLINE# def __init__( self , source , buffer_size = 65536 , chunk_size = 4096 , starting_values = [ ] , bottomless = False ) : #NEWLINE# #INDENT# if bottomless : #NEWLINE# #INDENT# maxlen = int ( ( buffer_size / chunk_size ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# maxlen = None #NEWLINE# #UNINDENT# self . data = deque ( starting_values , maxlen ) #NEWLINE# self . worker = InputStreamChunker ( source , self . data , buffer_size , chunk_size ) #NEWLINE# if starting_values : #NEWLINE# #INDENT# self . worker . data_added . set ( ) #NEWLINE# #UNINDENT# self . worker . start ( )