multiSSH3 5.59__py3-none-any.whl → 5.60__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of multiSSH3 might be problematic. Click here for more details.
- multiSSH3.py +30 -12
- {multissh3-5.59.dist-info → multissh3-5.60.dist-info}/METADATA +3 -3
- multissh3-5.60.dist-info/RECORD +6 -0
- {multissh3-5.59.dist-info → multissh3-5.60.dist-info}/WHEEL +1 -1
- multissh3-5.59.dist-info/RECORD +0 -6
- {multissh3-5.59.dist-info → multissh3-5.60.dist-info}/entry_points.txt +0 -0
- {multissh3-5.59.dist-info → multissh3-5.60.dist-info}/top_level.txt +0 -0
multiSSH3.py
CHANGED
|
@@ -54,10 +54,10 @@ except AttributeError:
|
|
|
54
54
|
# If neither is available, use a dummy decorator
|
|
55
55
|
def cache_decorator(func):
|
|
56
56
|
return func
|
|
57
|
-
version = '5.
|
|
57
|
+
version = '5.60'
|
|
58
58
|
VERSION = version
|
|
59
59
|
__version__ = version
|
|
60
|
-
COMMIT_DATE = '2025-03-
|
|
60
|
+
COMMIT_DATE = '2025-03-27'
|
|
61
61
|
|
|
62
62
|
CONFIG_FILE_CHAIN = ['./multiSSH3.config.json',
|
|
63
63
|
'~/multiSSH3.config.json',
|
|
@@ -226,7 +226,7 @@ class Host:
|
|
|
226
226
|
self.stdout = [] # the stdout of the command
|
|
227
227
|
self.stderr = [] # the stderr of the command
|
|
228
228
|
self.printedLines = -1 # the number of lines printed on the screen
|
|
229
|
-
self.lineNumToReprintSet = set() #
|
|
229
|
+
self.lineNumToReprintSet = set() # line numbers to reprint
|
|
230
230
|
self.lastUpdateTime = time.monotonic() # the last time the output was updated
|
|
231
231
|
self.files = files # the files to be copied to the host
|
|
232
232
|
self.ipmi = ipmi # whether to use ipmi to connect to the host
|
|
@@ -1136,20 +1136,37 @@ def __handle_reading_stream(stream,target, host):
|
|
|
1136
1136
|
host.lastUpdateTime = time.monotonic()
|
|
1137
1137
|
current_line = bytearray()
|
|
1138
1138
|
lastLineCommited = True
|
|
1139
|
+
curser_position = 0
|
|
1140
|
+
previousUpdateTime = time.monotonic()
|
|
1139
1141
|
for char in iter(lambda:stream.read(1), b''):
|
|
1140
1142
|
if char == b'\n':
|
|
1141
|
-
|
|
1142
|
-
add_line(current_line,target, host, keepLastLine=False)
|
|
1143
|
-
elif lastLineCommited:
|
|
1144
|
-
add_line(current_line,target, host, keepLastLine=True)
|
|
1143
|
+
add_line(current_line,target, host, keepLastLine=lastLineCommited)
|
|
1145
1144
|
current_line = bytearray()
|
|
1146
1145
|
lastLineCommited = True
|
|
1146
|
+
curser_position = 0
|
|
1147
|
+
previousUpdateTime = time.monotonic()
|
|
1148
|
+
continue
|
|
1147
1149
|
elif char == b'\r':
|
|
1150
|
+
curser_position = 0
|
|
1151
|
+
elif char == b'\x08':
|
|
1152
|
+
# backspace
|
|
1153
|
+
if curser_position > 0:
|
|
1154
|
+
curser_position -= 1
|
|
1155
|
+
else:
|
|
1156
|
+
# over write the character if the curser is not at the end of the line
|
|
1157
|
+
if curser_position < len(current_line):
|
|
1158
|
+
current_line[curser_position] = char[0]
|
|
1159
|
+
elif curser_position == len(current_line):
|
|
1160
|
+
current_line.append(char[0])
|
|
1161
|
+
else:
|
|
1162
|
+
# curser is bigger than the length of the line
|
|
1163
|
+
current_line += b' '*(curser_position - len(current_line)) + char
|
|
1164
|
+
curser_position += 1
|
|
1165
|
+
if time.monotonic() - previousUpdateTime > 0.1:
|
|
1166
|
+
# if the time since the last update is more than 10ms, we update the output
|
|
1148
1167
|
add_line(current_line,target, host, keepLastLine=lastLineCommited)
|
|
1149
|
-
current_line = bytearray()
|
|
1150
1168
|
lastLineCommited = False
|
|
1151
|
-
|
|
1152
|
-
current_line.extend(char)
|
|
1169
|
+
previousUpdateTime = time.monotonic()
|
|
1153
1170
|
if current_line:
|
|
1154
1171
|
add_line(current_line,target, host, keepLastLine=lastLineCommited)
|
|
1155
1172
|
|
|
@@ -2108,7 +2125,9 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
2108
2125
|
if host.lineNumToReprintSet:
|
|
2109
2126
|
# visible range is from host.printedLines - host_window_height + 1 to host.printedLines
|
|
2110
2127
|
visibleLowerBound = host.printedLines - host_window_height + 1
|
|
2111
|
-
|
|
2128
|
+
lineNumToReprintSet = host.lineNumToReprintSet
|
|
2129
|
+
host.lineNumToReprintSet = set()
|
|
2130
|
+
for lineNumToReprint in lineNumToReprintSet:
|
|
2112
2131
|
# if the line is visible, we will reprint it
|
|
2113
2132
|
if visibleLowerBound <= lineNumToReprint <= host.printedLines:
|
|
2114
2133
|
if visibleLowerBound <= 0:
|
|
@@ -2121,7 +2140,6 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
2121
2140
|
# Thus we will not use any presistent color pair for old lines
|
|
2122
2141
|
cpl = host.current_color_pair if lineNumToReprint == host.printedLines else [-1,-1,1]
|
|
2123
2142
|
_curses_add_string_to_window(window=host_window, y=linePos + 1, line=host.output[lineNumToReprint], color_pair_list=cpl,lead_str='│',keep_top_n_lines=1,box_ansi_color=box_ansi_color)
|
|
2124
|
-
host.lineNumToReprintSet = set()
|
|
2125
2143
|
host_window.refresh()
|
|
2126
2144
|
new_configured = False
|
|
2127
2145
|
last_refresh_time = time.perf_counter()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: multiSSH3
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.60
|
|
4
4
|
Summary: Run commands on multiple hosts via SSH
|
|
5
5
|
Home-page: https://github.com/yufei-pan/multiSSH3
|
|
6
6
|
Author: Yufei Pan
|
|
@@ -108,7 +108,7 @@ An example .ssh/config:
|
|
|
108
108
|
Host *
|
|
109
109
|
StrictHostKeyChecking no
|
|
110
110
|
ControlMaster auto
|
|
111
|
-
ControlPath /
|
|
111
|
+
ControlPath /run/user/%i/ssh_sockets_%C
|
|
112
112
|
ControlPersist 3600
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
multiSSH3.py,sha256=8GeHlj1I5JK8tTPkmG0HhJd9yRvWWWdXfqSnWDtc9bY,139908
|
|
2
|
+
multissh3-5.60.dist-info/METADATA,sha256=fFk9RztULUYPZ2vjrEtjMIU0se1yPp_YhGifryFNZSQ,18091
|
|
3
|
+
multissh3-5.60.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
4
|
+
multissh3-5.60.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
+
multissh3-5.60.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
+
multissh3-5.60.dist-info/RECORD,,
|
multissh3-5.59.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
multiSSH3.py,sha256=j_9ukdE0WHkS8b0Ls94JRdM7cBJZqv0GUQ2mmgRF_dk,139237
|
|
2
|
-
multissh3-5.59.dist-info/METADATA,sha256=6Ckopi4bXvlQQTuvkdoRN_7VtQsKInmOho0WSU6Tr24,18092
|
|
3
|
-
multissh3-5.59.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
4
|
-
multissh3-5.59.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
-
multissh3-5.59.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
-
multissh3-5.59.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|