Along with connection to servers across the internet, Twisted also connects to local processes with much the same API. The API is described in more detail in the documentation of :
  twisted.internet.interfaces.IReactorProcess
  twisted.internet.interfaces.IProcessTransport
  twisted.internet.protocol.ProcessProtocol

Processes are run through the reactor, using reactor.spawnProcess().Pipes are created to the child process, and added to the reactor core so that the application will not block while sending data into or pulling data out of the new process. reactor.spawnProcess() requires two arguments, processProtocol and executable, and optionally takes six more: arguments, environment, path, userID, groupID, and usePTY.

  from twisted.internet import reactor
  reactor.spawnProcess(processProtocol, executable, args=[program, arg1, arg2], env={'HOME': os.environ['HOME']}, path, uid, gid, usePTY, childFDs)

processProtocol should be an instance of a subclass of twisted.internet.protocol.ProcessProtocol. The interface is described below:
  executable is the full path of the program to run. It will be connected to processProtocol.
  args is a list of command line arguments to be passed to the process. args[0] should be the name of the process.
  env is a dictionary containing the environment to pass through to the process.
  path is the directory to run the process in. The child will switch to the given directory just before starting the new program. The default is to stay in the current directory.
  uid and gid are the user ID and group ID to run the subprcess as. Of course, changing identities will be more likely to succeed if you start as root.
  usePTY specifies whether the child process should be run with a pty, or if it should just get a pair of pipes. Interactive programs(where you don't know when it may read or write) need to be run with ptys.
  childFDs lets you specify how the child's file descriptors should be set up. Each key is a file descriptor number(an integer) as seen by the child. 0, 1 and 2 are usually stdin, stdout, and stderr, but some programes may be instructed to use addtional fds through command-line arguments or environment variables. Each value is either an interger specifying one of the parent's current file descriptors, the string 'r' which creates a pipe that the parent can read from, or the string 'w' which creates a pipe that the parent can write to. If childFDs is not provided, a default is used which creates the usual stdin-writer, stdout-reader, and stderr-reader pipes.

args and env have empty default values. but many programes depend upon them to be set correctly. At the very leaset, args[0] should probably be the same as wxecutable. If you just provide os.environ.for env, the child program will inherit the environment from the current process. which is usually the civilized thing to do(unless you want to explicitly clean the environment as a security precaution). The default is to give an empty env to the child.
reactor.spawnProcess() returns an instance that implements the twisted.internet.interfaces.IProcessTransport.