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-0.985.tar.gz
(19.0 kB
view hashes)