multiSSH3 5.71__py3-none-any.whl → 5.72__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.
- multiSSH3.py +10 -11
- {multissh3-5.71.dist-info → multissh3-5.72.dist-info}/METADATA +1 -1
- multissh3-5.72.dist-info/RECORD +6 -0
- {multissh3-5.71.dist-info → multissh3-5.72.dist-info}/WHEEL +1 -1
- multissh3-5.71.dist-info/RECORD +0 -6
- {multissh3-5.71.dist-info → multissh3-5.72.dist-info}/entry_points.txt +0 -0
- {multissh3-5.71.dist-info → multissh3-5.72.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.72'
|
|
58
58
|
VERSION = version
|
|
59
59
|
__version__ = version
|
|
60
|
-
COMMIT_DATE = '2025-05-
|
|
60
|
+
COMMIT_DATE = '2025-05-21'
|
|
61
61
|
|
|
62
62
|
CONFIG_FILE_CHAIN = ['./multiSSH3.config.json',
|
|
63
63
|
'~/multiSSH3.config.json',
|
|
@@ -1854,19 +1854,19 @@ def _get_hosts_to_display (hosts, max_num_hosts, hosts_to_display = None):
|
|
|
1854
1854
|
waiting_hosts = [host for host in hosts if host.returncode is None and not host.output]
|
|
1855
1855
|
new_hosts_to_display = (running_hosts + failed_hosts + finished_hosts + waiting_hosts)[:max_num_hosts]
|
|
1856
1856
|
if not hosts_to_display:
|
|
1857
|
-
return new_hosts_to_display , {'running':len(running_hosts), 'failed':len(failed_hosts), 'finished':len(finished_hosts), 'waiting':len(waiting_hosts)}
|
|
1857
|
+
return new_hosts_to_display , {'running':len(running_hosts), 'failed':len(failed_hosts), 'finished':len(finished_hosts), 'waiting':len(waiting_hosts)}, set(new_hosts_to_display)
|
|
1858
1858
|
# we will compare the new_hosts_to_display with the old one, if some hosts are not in their original position, we will reprint all lines
|
|
1859
|
+
rearrangedHosts = set()
|
|
1859
1860
|
for i, host in enumerate(new_hosts_to_display):
|
|
1860
1861
|
if host not in hosts_to_display or i != hosts_to_display.index(host):
|
|
1861
|
-
|
|
1862
|
-
return new_hosts_to_display , {'running':len(running_hosts), 'failed':len(failed_hosts), 'finished':len(finished_hosts), 'waiting':len(waiting_hosts)}
|
|
1862
|
+
rearrangedHosts.add(host)
|
|
1863
|
+
return new_hosts_to_display , {'running':len(running_hosts), 'failed':len(failed_hosts), 'finished':len(finished_hosts), 'waiting':len(waiting_hosts)}, rearrangedHosts
|
|
1863
1864
|
|
|
1864
1865
|
def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min_char_len = DEFAULT_CURSES_MINIMUM_CHAR_LEN, min_line_len = DEFAULT_CURSES_MINIMUM_LINE_LEN,single_window=DEFAULT_SINGLE_WINDOW, config_reason = 'New Configuration'):
|
|
1865
1866
|
_ = config_reason
|
|
1866
1867
|
try:
|
|
1867
1868
|
box_ansi_color = None
|
|
1868
1869
|
org_dim = stdscr.getmaxyx()
|
|
1869
|
-
new_configured = True
|
|
1870
1870
|
# To do this, first we need to know the size of the terminal
|
|
1871
1871
|
max_y, max_x = org_dim
|
|
1872
1872
|
# we will use one line to print the aggregated stats for the hosts.
|
|
@@ -1890,7 +1890,7 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
1890
1890
|
max_num_hosts = max_num_hosts_x * max_num_hosts_y
|
|
1891
1891
|
if max_num_hosts < 1:
|
|
1892
1892
|
return (lineToDisplay,curserPosition , min_char_len, min_line_len, single_window, 'Terminal too small to display any hosts')
|
|
1893
|
-
hosts_to_display , host_stats = _get_hosts_to_display(hosts, max_num_hosts)
|
|
1893
|
+
hosts_to_display , host_stats, rearrangedHosts = _get_hosts_to_display(hosts, max_num_hosts)
|
|
1894
1894
|
if len(hosts_to_display) == 0:
|
|
1895
1895
|
return (lineToDisplay,curserPosition , min_char_len, min_line_len, single_window, 'No hosts to display')
|
|
1896
1896
|
# Now we calculate the actual number of hosts we will display for x and y
|
|
@@ -2081,16 +2081,15 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
2081
2081
|
if time.perf_counter() - last_refresh_time < 0.01:
|
|
2082
2082
|
time.sleep(max(0,0.01 - time.perf_counter() + last_refresh_time))
|
|
2083
2083
|
#stdscr.clear()
|
|
2084
|
-
hosts_to_display, host_stats = _get_hosts_to_display(hosts, max_num_hosts,hosts_to_display)
|
|
2085
2084
|
for host_window, host in zip(host_windows, hosts_to_display):
|
|
2086
2085
|
# we will only update the window if there is new output or the window is not fully printed
|
|
2087
|
-
if
|
|
2088
|
-
host.lineNumToPrintSet.update(range(len(host.output)))
|
|
2086
|
+
if host in rearrangedHosts:
|
|
2089
2087
|
linePrintOut = f'{host.name}:[{host.command}]'.replace('\n', ' ').replace('\r', ' ').strip()
|
|
2090
2088
|
_curses_add_string_to_window(window=host_window, y=0, line=linePrintOut, color_pair_list=[-1, -1, 1],centered=True,fill_char='─',lead_str='┼',box_ansi_color=box_ansi_color)
|
|
2091
2089
|
# clear the window
|
|
2092
2090
|
for i in range(host_window_height - 1):
|
|
2093
2091
|
_curses_add_string_to_window(window=host_window, color_pair_list=[-1, -1, 1], y=i + 1,lead_str='│',keep_top_n_lines=1,box_ansi_color=box_ansi_color)
|
|
2092
|
+
host.lineNumToPrintSet.update(range(len(host.output)))
|
|
2094
2093
|
# for i in range(host.printedLines, len(host.output)):
|
|
2095
2094
|
# _curses_add_string_to_window(window=host_window, y=i + 1, line=host.output[i], color_pair_list=host.current_color_pair,lead_str='│',keep_top_n_lines=1,box_ansi_color=box_ansi_color)
|
|
2096
2095
|
# host.printedLines = len(host.output)
|
|
@@ -2111,7 +2110,7 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
2111
2110
|
if org_dim != stdscr.getmaxyx():
|
|
2112
2111
|
return (lineToDisplay,curserPosition , min_char_len, min_line_len, single_window, 'Terminal resize detected')
|
|
2113
2112
|
host_window.refresh()
|
|
2114
|
-
|
|
2113
|
+
hosts_to_display, host_stats,rearrangedHosts = _get_hosts_to_display(hosts, max_num_hosts,hosts_to_display)
|
|
2115
2114
|
last_refresh_time = time.perf_counter()
|
|
2116
2115
|
except Exception as e:
|
|
2117
2116
|
import traceback
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
multiSSH3.py,sha256=d4tiPSSa51_OrTZujc0XrzR9elZq10lyyRBLtRffWyk,144750
|
|
2
|
+
multissh3-5.72.dist-info/METADATA,sha256=d4CQxszsQx7a7GWkQSYC2VGWdLQP13C3kp1RTAIHK5Y,18093
|
|
3
|
+
multissh3-5.72.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
4
|
+
multissh3-5.72.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
+
multissh3-5.72.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
+
multissh3-5.72.dist-info/RECORD,,
|
multissh3-5.71.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
multiSSH3.py,sha256=Ynd6Q76wV85vjZUSIavxQePgqWc_4xTObjajioTCFgM,144718
|
|
2
|
-
multissh3-5.71.dist-info/METADATA,sha256=8MsX_mwvDFMX53bwfVi81Gaqp6bjgXfqMhYMOTMQNDc,18093
|
|
3
|
-
multissh3-5.71.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
4
|
-
multissh3-5.71.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
-
multissh3-5.71.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
-
multissh3-5.71.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|