130
130
shlex_split ,
131
131
)
132
132
from .rich_utils import (
133
- Cmd2Console ,
133
+ Cmd2GeneralConsole ,
134
134
RichPrintKwargs ,
135
135
)
136
136
from .styles import Cmd2Style
161
161
162
162
# Set up readline
163
163
if rl_type == RlType .NONE : # pragma: no cover
164
- Cmd2Console (sys .stderr ).print (rl_warning , style = Cmd2Style .WARNING )
164
+ Cmd2GeneralConsole (sys .stderr ).print (rl_warning , style = Cmd2Style .WARNING )
165
165
else :
166
166
from .rl_utils import (
167
167
readline ,
@@ -1221,7 +1221,7 @@ def print_to(
1221
1221
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1222
1222
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1223
1223
If None (the default for this parameter), the output will default to no word-wrapping, as
1224
- configured by the Cmd2Console .
1224
+ configured by the Cmd2GeneralConsole .
1225
1225
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1226
1226
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1227
1227
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1230,7 +1230,7 @@ def print_to(
1230
1230
prepared_objects = ru .prepare_objects_for_rich_print (* objects )
1231
1231
1232
1232
try :
1233
- Cmd2Console (file ).print (
1233
+ Cmd2GeneralConsole (file ).print (
1234
1234
* prepared_objects ,
1235
1235
sep = sep ,
1236
1236
end = end ,
@@ -1245,7 +1245,7 @@ def print_to(
1245
1245
# warning message, then set the broken_pipe_warning attribute
1246
1246
# to the message you want printed.
1247
1247
if self .broken_pipe_warning and file != sys .stderr :
1248
- Cmd2Console (sys .stderr ).print (self .broken_pipe_warning )
1248
+ Cmd2GeneralConsole (sys .stderr ).print (self .broken_pipe_warning )
1249
1249
1250
1250
def poutput (
1251
1251
self ,
@@ -1267,7 +1267,7 @@ def poutput(
1267
1267
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1268
1268
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1269
1269
If None (the default for this parameter), the output will default to no word-wrapping, as
1270
- configured by the Cmd2Console .
1270
+ configured by the Cmd2GeneralConsole .
1271
1271
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1272
1272
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1273
1273
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1303,7 +1303,7 @@ def perror(
1303
1303
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1304
1304
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1305
1305
If None (the default for this parameter), the output will default to no word-wrapping, as
1306
- configured by the Cmd2Console .
1306
+ configured by the Cmd2GeneralConsole .
1307
1307
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1308
1308
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1309
1309
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1337,7 +1337,7 @@ def psuccess(
1337
1337
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1338
1338
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1339
1339
If None (the default for this parameter), the output will default to no word-wrapping, as
1340
- configured by the Cmd2Console .
1340
+ configured by the Cmd2GeneralConsole .
1341
1341
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1342
1342
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1343
1343
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1370,7 +1370,7 @@ def pwarning(
1370
1370
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1371
1371
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1372
1372
If None (the default for this parameter), the output will default to no word-wrapping, as
1373
- configured by the Cmd2Console .
1373
+ configured by the Cmd2GeneralConsole .
1374
1374
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1375
1375
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1376
1376
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1404,7 +1404,7 @@ def pexcept(
1404
1404
final_msg = Text ()
1405
1405
1406
1406
if self .debug and sys .exc_info () != (None , None , None ):
1407
- console = Cmd2Console (sys .stderr )
1407
+ console = Cmd2GeneralConsole (sys .stderr )
1408
1408
console .print_exception (word_wrap = True )
1409
1409
else :
1410
1410
final_msg += f"EXCEPTION of type '{ type (exception ).__name__ } ' occurred with message: { exception } "
@@ -1442,7 +1442,7 @@ def pfeedback(
1442
1442
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1443
1443
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1444
1444
If None (the default for this parameter), the output will default to no word-wrapping, as
1445
- configured by the Cmd2Console .
1445
+ configured by the Cmd2GeneralConsole .
1446
1446
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1447
1447
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
1448
1448
method and still call `super()` without encountering unexpected keyword argument errors.
@@ -1498,7 +1498,7 @@ def ppaged(
1498
1498
terminal width; instead, any text that doesn't fit will run onto the following line(s),
1499
1499
similar to the built-in print() function. Set to False to enable automatic word-wrapping.
1500
1500
If None (the default for this parameter), the output will default to no word-wrapping, as
1501
- configured by the Cmd2Console .
1501
+ configured by the Cmd2GeneralConsole .
1502
1502
Note: If chop is True and a pager is used, soft_wrap is automatically set to True.
1503
1503
:param rich_print_kwargs: optional additional keyword arguments to pass to Rich's Console.print().
1504
1504
:param kwargs: Arbitrary keyword arguments. This allows subclasses to extend the signature of this
@@ -1525,7 +1525,7 @@ def ppaged(
1525
1525
soft_wrap = True
1526
1526
1527
1527
# Generate the bytes to send to the pager
1528
- console = Cmd2Console (self .stdout )
1528
+ console = Cmd2GeneralConsole (self .stdout )
1529
1529
with console .capture () as capture :
1530
1530
console .print (
1531
1531
* prepared_objects ,
0 commit comments