cmd2 2.5.3__py3-none-any.whl → 2.5.4__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.
- cmd2/cmd2.py +4 -1
- cmd2/constants.py +3 -0
- cmd2/utils.py +2 -1
- {cmd2-2.5.3.dist-info → cmd2-2.5.4.dist-info}/METADATA +1 -1
- {cmd2-2.5.3.dist-info → cmd2-2.5.4.dist-info}/RECORD +8 -8
- {cmd2-2.5.3.dist-info → cmd2-2.5.4.dist-info}/LICENSE +0 -0
- {cmd2-2.5.3.dist-info → cmd2-2.5.4.dist-info}/WHEEL +0 -0
- {cmd2-2.5.3.dist-info → cmd2-2.5.4.dist-info}/top_level.txt +0 -0
cmd2/cmd2.py
CHANGED
@@ -5335,9 +5335,12 @@ class Cmd(cmd.Cmd):
|
|
5335
5335
|
if update_terminal:
|
5336
5336
|
import shutil
|
5337
5337
|
|
5338
|
+
# Prior to Python 3.11 this can return 0, so use a fallback if needed.
|
5339
|
+
terminal_columns = shutil.get_terminal_size().columns or constants.DEFAULT_TERMINAL_WIDTH
|
5340
|
+
|
5338
5341
|
# Print a string which replaces the onscreen prompt and input lines with the alert.
|
5339
5342
|
terminal_str = ansi.async_alert_str(
|
5340
|
-
terminal_columns=
|
5343
|
+
terminal_columns=terminal_columns,
|
5341
5344
|
prompt=rl_get_display_prompt(),
|
5342
5345
|
line=readline.get_line_buffer(),
|
5343
5346
|
cursor_offset=rl_get_point(),
|
cmd2/constants.py
CHANGED
cmd2/utils.py
CHANGED
@@ -874,7 +874,8 @@ def align_text(
|
|
874
874
|
)
|
875
875
|
|
876
876
|
if width is None:
|
877
|
-
|
877
|
+
# Prior to Python 3.11 this can return 0, so use a fallback if needed.
|
878
|
+
width = shutil.get_terminal_size().columns or constants.DEFAULT_TERMINAL_WIDTH
|
878
879
|
|
879
880
|
if width < 1:
|
880
881
|
raise ValueError("width must be at least 1")
|
@@ -3,9 +3,9 @@ cmd2/ansi.py,sha256=BasPj_Wla0cEyjpe_zu-cn24CgVdSXK3sfxknLM1WcY,32203
|
|
3
3
|
cmd2/argparse_completer.py,sha256=6z0zmODqM7vhQhI0c6JUvCmR2V4qfdWQEyTZeNIea8c,36505
|
4
4
|
cmd2/argparse_custom.py,sha256=bbAYRr79ZSJWGchd7trmRQDHWAsSJaW0dTQMp65Mrv4,57806
|
5
5
|
cmd2/clipboard.py,sha256=7EISono76d7djj17hbvR9cCTB7jVGSBkUjgVQiMyUjE,549
|
6
|
-
cmd2/cmd2.py,sha256=
|
6
|
+
cmd2/cmd2.py,sha256=hTnS3UfV6SxZ9YpAez0MlL497t3HUvmqIsDIqbvJasI,261514
|
7
7
|
cmd2/command_definition.py,sha256=U5Bx2MwsK2JWUKzmFm4u9OhRgJqp-2r2Q85qsKWCdXQ,7585
|
8
|
-
cmd2/constants.py,sha256=
|
8
|
+
cmd2/constants.py,sha256=DioxETv-_HzcMUnjuPyz7Cqw4YEt_MTrzOMotiHj-Jo,1981
|
9
9
|
cmd2/decorators.py,sha256=wM0PtalUseDfJVVQV2LkbZbqkZad2XudRiCmARCBWWs,20658
|
10
10
|
cmd2/exceptions.py,sha256=DwX7rQmon4eRyX1ZK4yne4lObdPO1j5Agg3Bav6pXwU,3600
|
11
11
|
cmd2/history.py,sha256=GkJ3pZQNGNoXa9pYLul_iaqLeK132V5nLZZG6MsIEus,15000
|
@@ -16,9 +16,9 @@ cmd2/py_bridge.py,sha256=YUkEnng_kAwnFbh1sPMyeMya_BF7G1kg6MT-6mW-IG4,5022
|
|
16
16
|
cmd2/rl_utils.py,sha256=HVPdNjuYyU67-XerPUJArmzhohzI1ABrZhU9cLc-EIs,11538
|
17
17
|
cmd2/table_creator.py,sha256=qoxt9s3MxQkfSkp4cIPFMlVzC7kRjUU55p0ow7pFQus,47544
|
18
18
|
cmd2/transcript.py,sha256=I0sD38RbG79Qz9GXIlfh1pHSNmWBTY2SLZAKEdSLWI4,9182
|
19
|
-
cmd2/utils.py,sha256=
|
20
|
-
cmd2-2.5.
|
21
|
-
cmd2-2.5.
|
22
|
-
cmd2-2.5.
|
23
|
-
cmd2-2.5.
|
24
|
-
cmd2-2.5.
|
19
|
+
cmd2/utils.py,sha256=4tctxMzhICjXn-7waJ9YNWCm7FdlvuC0ae6NcOLNI9M,49498
|
20
|
+
cmd2-2.5.4.dist-info/LICENSE,sha256=QXrW0Z0merk9mncyUkn-sgRxhT8_o1dL5HEaBNH47Q4,1099
|
21
|
+
cmd2-2.5.4.dist-info/METADATA,sha256=Zfmd83aX6x7ce4IUTsLR4Yz1EKR893oxIiBGszcfik8,13308
|
22
|
+
cmd2-2.5.4.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
23
|
+
cmd2-2.5.4.dist-info/top_level.txt,sha256=gJbOJmyrARwLhm5diXAtzlNQdxbDZ8iRJ8HJi65_5hg,5
|
24
|
+
cmd2-2.5.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|