Skip to main content

write automation scripts for ssh and subprocess in python

Project description

The sshscript is an integration of subprocess and paramiko . It provides an unique interface to invoke commands locally and remotely. Something likes to embed shell commands in a python script. For example:

# execute a command on localhost and parse the output with python
$ls -l
for line in $.stdout.split('\n'):
    if line.startswith('d'): continue
    print(line)

# execute a command on remote host and parse the output with python
@open('user@host')
$ls -l
for line in $.stdout.split('\n'):
    if line.startswith('d'): continue
    print(line)

More on github

Project details


Download files

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

Source Distribution

sshscript-0.983.tar.gz (19.1 kB view hashes)

Uploaded Source

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