'Call this to register producer for standard input.
If there is no standard input producer.stopProducing() will
be called immediately.'

def registerProducer(self, producer, streaming):

    if (0 in self.pipes):
        self.pipes[0].registerProducer(producer, streaming)
    else:
        producer.stopProducing()
