Skip to main content

Twisted Process interface

Project description

txsh is a dynamic wrapper around Twisted ProcessProtocol and spawnProcess that allows you to call any program as if it were a function and return a deferred with its exit code and output.

from twisted.internet import reactor
from txsh import ls

def my_callback(exc_info):
    print 'Exit Code:', exc_info.status
    print 'Output:', exc_info.stdout
    print 'Errors:', exc_info.stderr
    reactor.stop()

d = ls()
d.addCallback(my_callback)

reactor.run()

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for txsh, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size txsh-0.2.1-py2-none-any.whl (11.1 kB) File type Wheel Python version py2 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page