Skip to content

Commit 7952ef1

Browse files
committed
Improved comment
1 parent 465bec7 commit 7952ef1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2993,12 +2993,14 @@ def run(filename: str):
29932993
interp = InteractiveConsole(locals=localvars)
29942994
interp.runcode('import sys, os;sys.path.insert(0, os.getcwd())')
29952995

2996+
# Check if the user is running a Python statement on the command line
29962997
if args.command:
29972998
full_command = args.command
29982999
if args.remainder:
29993000
full_command += ' ' + ' '.join(args.remainder)
30003001

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.
30023004
bridge.cmd_echo = True
30033005
interp.runcode(full_command)
30043006

0 commit comments

Comments
 (0)