#NEWLINE# def configure( self , runtime_environment ) : #NEWLINE# #INDENT# self . runtime_environment = runtime_environment #NEWLINE# self . setServiceParent ( runtime_environment . application ) #NEWLINE# self . dependency_manager = runtime_environment . dependency_manager #NEWLINE# stdin_config = runtime_environment . get_configuration_value ( 'stdin' , dict ( enabled = False ) ) #NEWLINE# if ( not stdin_config . pop ( 'enabled' , True ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# processor = stdin_config . pop ( 'processor' ) #NEWLINE# self . processor = ( dict ( provider = processor ) if isinstance ( processor , basestring ) else processor ) #NEWLINE# self . protocol = StdinProtocol ( self . deferred_queue , ** stdin_config ) #NEWLINE# self . factory = StandardIO ( self . protocol ) #NEWLINE# self . puller = util . PullFromQueueAndProcessWithDependency ( self . deferred_queue , self . processor ) #NEWLINE# self . puller . setName ( 'stdin.lines' ) #NEWLINE# self . puller . configure ( runtime_environment ) #NEWLINE# self . puller . setServiceParent ( self )