File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ prompt is displayed.
103103 greater flexibility in passing keyword arguments to ` console.print() ` calls.
104104 - Removed ` always_show_hint ` settable as it provided a poor user experience with
105105 ` prompt-toolkit `
106+ - ` cmd2 ` redirection only captures output directed to ` self.stdout ` (e.g., via
107+ ` self.poutput() ` ). Standard ` print() ` calls write directly to ` sys.stdout ` and are not
108+ captured. However, ` print() ` calls within ` pyscripts ` and the interactive Python shell are
109+ treated as command output and sent to ` self.stdout ` , allowing them to be captured.
106110- Enhancements
107111 - New ` cmd2.Cmd ` parameters
108112 - ** auto_suggest** : (boolean) if ` True ` , provide fish shell style auto-suggestions. These
@@ -139,6 +143,8 @@ prompt is displayed.
139143 full type hints and IDE autocompletion for ` self._cmd ` without needing to override and cast
140144 the property.
141145 - Added ` traceback_kwargs ` attribute to allow customization of Rich-based tracebacks.
146+ - The ` print() ` function available in a ` pyscript ` writes to ` self.stdout ` and respects the
147+ ` allow_style ` setting. It also supports printing ` Rich ` objects.
142148
143149## 3.5.1 (April 24, 2026)
144150
You can’t perform that action at this time.
0 commit comments