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.992.tar.gz (20.1 kB view details)

Uploaded Source

File details

Details for the file sshscript-0.992.tar.gz.

File metadata

  • Download URL: sshscript-0.992.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for sshscript-0.992.tar.gz
Algorithm Hash digest
SHA256 d9835c20a4fe07a87d85bd122224300c7583eab8346e399cec51f19d3e4c8e72
MD5 e507fa2f4a1e9b26601eae0659de4702
BLAKE2b-256 e3a5f98bef9a5d08ffd1bf7c4fdc2ed05fabe38accf35089742d9e3577ca7dd6

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