We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96224cf commit 4dd007eCopy full SHA for 4dd007e
1 file changed
cmd2/cmd2.py
@@ -73,6 +73,7 @@
73
Table,
74
)
75
from rich.text import Text
76
+from rich.traceback import Traceback
77
78
from . import (
79
argparse_completer,
@@ -1357,12 +1358,14 @@ def pexcept(
1357
1358
1359
# Only print a traceback if we're in debug mode and one exists.
1360
if self.debug and sys.exc_info() != (None, None, None):
- console.print_exception(
1361
- width=console.width,
+ traceback = Traceback(
1362
+ width=None, # Use all available width
1363
+ code_width=None, # Use all available width
1364
show_locals=True,
1365
max_frames=0, # 0 means full traceback.
1366
word_wrap=True, # Wrap long lines of code instead of truncate
1367
1368
+ console.print(traceback)
1369
console.print()
1370
return
1371
0 commit comments