We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 465bec7 commit 7952ef1Copy full SHA for 7952ef1
cmd2/cmd2.py
@@ -2993,12 +2993,14 @@ def run(filename: str):
2993
interp = InteractiveConsole(locals=localvars)
2994
interp.runcode('import sys, os;sys.path.insert(0, os.getcwd())')
2995
2996
+ # Check if the user is running a Python statement on the command line
2997
if args.command:
2998
full_command = args.command
2999
if args.remainder:
3000
full_command += ' ' + ' '.join(args.remainder)
3001
- # If running at the CLI, print the output of the command
3002
+ # Set cmd_echo to True so PyscriptBridge statements like: py app('help')
3003
+ # run at the command line will print their output.
3004
bridge.cmd_echo = True
3005
interp.runcode(full_command)
3006
0 commit comments