code: def getExitCode(self, command, env={}, path=None, uid=None, gid=None,
                      usePTY=0, childFDs=None):
          
          deferred = defer.Deferred()
          processProtocol = _SummaryProcessProtocol(deferred)
          self.execute(processProtocol, command, env, path, uid, gid,
                       usePTY, childFDs)
          @deferred.addCallback
          def getStdOut(tuple_):
              _stdout, _stderr, exitCode = tuple_
              return exitCode
          return deferred
docs: Execute a command and get the return code of the finished process.