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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for sshscript-0.986.tar.gz
Algorithm Hash digest
SHA256 2ff6410993f46748d0e3857e083ae33c227a71a5157d68fa33ff186051df318d
MD5 b04eaef8e1cd1ac4a91450f0283bde0c
BLAKE2b-256 a14bdcbaa2cda7840efd38554cd3c00bb2f4b6fd2b12216db21d705297158f3c

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