You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+7-5
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Simple and Intuitive
17
17
SSHScript adds dollar-syntax syntax sugar to Python, which allows you to write scripts that closely resemble the process of manually performing operations.
18
18
For example, here is a Python script with dollar-syntax that runs the hostname command on localhost, a remote server, and the server behind the remote server:
19
19
20
-
.. code-block:: python
20
+
.. code-block::
21
21
22
22
## run "hostname" on localhost
23
23
$hostname
@@ -28,13 +28,14 @@ For example, here is a Python script with dollar-syntax that runs the hostname c
28
28
## run "hostname" on host2, with is behind the host1
29
29
$hostname
30
30
31
+
31
32
Flexible and Robust
32
33
=======================
33
34
SSHScript v2.0 makes a great improvement by providing all the features of dollar-syntax in the sshscript module. This makes SSHScript work exactly like any other counterpart package when integrating with existing projects. This allows users to use all of SSHScript's features in pure Python without writing dollar-syntax.
34
35
35
36
Here is an example of the same script as above, but using only the sshscript module:
36
37
37
-
.. code-block::python
38
+
.. code-block::
38
39
39
40
from sshscript import SSHScriptSession
40
41
session = SSHScriptSession()
@@ -47,6 +48,7 @@ Here is an example of the same script as above, but using only the sshscript mod
47
48
## run "hostname" on host2, with is behind the host1
48
49
host2_session('hostname')
49
50
51
+
50
52
Install
51
53
=======
52
54
@@ -76,7 +78,7 @@ Examples
76
78
77
79
An example of SSHScript dollar-syntax (v2.0):
78
80
79
-
.. code-block:: python
81
+
.. code-block::
80
82
81
83
## filename: example.spy
82
84
## run: sshscript example.spy
@@ -113,7 +115,7 @@ An example of SSHScript dollar-syntax (v2.0):
0 commit comments