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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sshscript-1.1.6.tar.gz
(20.7 kB
view details)
File details
Details for the file sshscript-1.1.6.tar.gz
.
File metadata
- Download URL: sshscript-1.1.6.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5979ca938a696e22d29695170d9a4290f82c7cfb434e2a09dec9030c23f50301 |
|
MD5 | 0ba28b75345e35286d5a9e117af42c39 |
|
BLAKE2b-256 | 8a1af4e32837fb8ffc2ebdc27ba66585f76b3eb5d7a3ed30939e621e35c302f8 |