code: def outReceived(self, data):
          
  
          if self.stdout:
              self.stdout.write(data.decode('ascii'))
  
          # minor hack: we can't try this in connectionMade because
          # that's when the process first starts up so Tor hasn't
          # opened any ports properly yet. So, we presume that after
          # its first output we're good-to-go. If this fails, we'll
          # reset and try again at the next output (see this class'
          # tor_connection_failed)
          txtorlog.msg(data)
          if not self.attempted_connect and self.connection_creator \
                  and b'Opening Control listener' in data:
              self.attempted_connect = True
              # hmmm, we don't "do" anything with this Deferred?
              # (should it be connected to the when_connected
              # Deferreds?)
              d = self.connection_creator()
              d.addCallback(self._tor_connected)
              d.addErrback(self._tor_connection_failed)
docs: :api:`twisted.internet.protocol.ProcessProtocol <ProcessProtocol>` API