Allow SSH class to be used with 'with' statements

Issue #3 resolved
Jesse Almanrode repo owner created an issue

Add the enter and exit functions to the SSH class to allow it to be used with Python's 'with' statement.

I totally want this:

with SSH('localhost', username='jdoe', password='jdoe') as s:
    s.ssh_command('uptime')

Comments (2)

  1. Log in to comment