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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

txsh-0.2.1-py2-none-any.whl (11.1 kB view details)

Uploaded Python 2

File details

Details for the file txsh-0.2.1-py2-none-any.whl.

File metadata

File hashes

Hashes for txsh-0.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 6d8c24e197fec142a59343f8594fad2a2d95e7a7492c3084f258ab1c77b74647
MD5 d77e2c808d78db45697cc432c3f587f4
BLAKE2b-256 a13b378a120e57dbc47c0f468a48f0d7a937c040b5da029197eb349c415478ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page