multiSSH3 5.65__py3-none-any.whl → 5.67__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 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.65'
57
+ version = '5.67'
58
58
  VERSION = version
59
59
  __version__ = version
60
- COMMIT_DATE = '2025-05-06'
60
+ COMMIT_DATE = '2025-05-08'
61
61
 
62
62
  CONFIG_FILE_CHAIN = ['./multiSSH3.config.json',
63
63
  '~/multiSSH3.config.json',
@@ -67,7 +67,7 @@ CONFIG_FILE_CHAIN = ['./multiSSH3.config.json',
67
67
  '/etc/multiSSH3.config.json'] # The first one has the highest priority
68
68
 
69
69
 
70
- # TODO: Add terminal TUI with history support
70
+ # TODO: Add terminal TUI
71
71
 
72
72
  #%% ------------ Pre Helper Functions ----------------
73
73
  def eprint(*args, **kwargs):
@@ -1769,28 +1769,27 @@ def _curses_add_string_to_window(window, line = '', y = 0, x = 0, number_of_char
1769
1769
  Returns:
1770
1770
  None
1771
1771
  """
1772
- if window.getmaxyx()[0] == 0 or window.getmaxyx()[1] == 0 or x >= window.getmaxyx()[1]:
1772
+ maxY, maxX = window.getmaxyx()
1773
+ if maxY == 0 or maxX == 0 or x >= maxX:
1773
1774
  return
1774
1775
  if x < 0:
1775
- x = window.getmaxyx()[1] + x
1776
+ x = maxX + x
1776
1777
  if number_of_char_to_write == -1:
1777
- numChar = window.getmaxyx()[1] - x -1
1778
+ numChar = maxX - x -1
1778
1779
  elif number_of_char_to_write == 0:
1779
1780
  return
1780
- elif number_of_char_to_write + x > window.getmaxyx()[1]:
1781
- numChar = window.getmaxyx()[1] - x -1
1782
1781
  else:
1783
- numChar = number_of_char_to_write
1782
+ numChar = min(number_of_char_to_write,maxX - x -1)
1784
1783
  if numChar < 0:
1785
1784
  return
1786
- if y < 0 or y >= window.getmaxyx()[0]:
1787
- if keep_top_n_lines > window.getmaxyx()[0] -1:
1788
- keep_top_n_lines = window.getmaxyx()[0] -1
1785
+ if y < 0 or y >= maxY:
1786
+ if keep_top_n_lines > maxY -1:
1787
+ keep_top_n_lines = maxY -1
1789
1788
  if keep_top_n_lines < 0:
1790
1789
  keep_top_n_lines = 0
1791
1790
  window.move(keep_top_n_lines,0)
1792
1791
  window.deleteln()
1793
- y = window.getmaxyx()[0] - 1
1792
+ y = maxY - 1
1794
1793
  line = line.replace('\n', ' ').replace('\r', ' ')
1795
1794
  if parse_ansi_colors:
1796
1795
  segments = re.split(r"(\x1b\[[\d;]*m)", line) # Split line by ANSI escape codes
@@ -2458,7 +2457,8 @@ def getStrCommand(hosts = DEFAULT_HOSTS,commands = None,oneonone = DEFAULT_ONE_O
2458
2457
  repeat = repeat,interval = interval,
2459
2458
  shortend = shortend)
2460
2459
  commandStr = '"' + '" "'.join(commands) + '"' if commands else ''
2461
- programName = sys.argv[0] if (sys.argv and sys.argv[0]) else 'mssh'
2460
+ filePath = os.path.abspath(__file__)
2461
+ programName = filePath if filePath else 'mssh'
2462
2462
  return f'{programName} {argsStr} {hostStr} {commandStr}'
2463
2463
 
2464
2464
  #%% ------------ Record History Block ----------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multiSSH3
3
- Version: 5.65
3
+ Version: 5.67
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
@@ -0,0 +1,6 @@
1
+ multiSSH3.py,sha256=NW0UP3cCzAK6hPDvj5mFc3vc2lTNF0jfqJM_HTdqxKE,144034
2
+ multissh3-5.67.dist-info/METADATA,sha256=CLiHx9VQdxFmnI92-h7aPaMFawBDCuGRC_fnndAkjc8,18093
3
+ multissh3-5.67.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
4
+ multissh3-5.67.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
5
+ multissh3-5.67.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
6
+ multissh3-5.67.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- multiSSH3.py,sha256=lcDC3b77m46ZA0UlQNgwsPkeLuZHZeQ-8qCouWoJWvM,144231
2
- multissh3-5.65.dist-info/METADATA,sha256=ZlRLrTgupEbI3JHZyY-FZcNcaGVdT8bAsgbenzBjQ0s,18093
3
- multissh3-5.65.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
4
- multissh3-5.65.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
5
- multissh3-5.65.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
6
- multissh3-5.65.dist-info/RECORD,,