From 9156618a56d635bb51261d019a3703a1b4e3b588 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Fri, 14 Feb 2020 16:28:41 -0500 Subject: Fixed bug where pyscripts could edit cmd2.Cmd.py_locals dictionary. Fixed bug where cmd2 set sys.path[0] for a pyscript to its cwd instead of the script's directory. Fixed bug where sys.path was not being restored after a pyscript ran. Setting the following pyscript variables: __name__: __main__ __file__: script path (as typed) Removed do_py.run() function since it didn't handle arguments and offered no benefit over run_pyscript. --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f9d71831..edf5f93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,15 @@ * Corrected issue where the actual new value was not always being printed in do_set. This occurred in cases where the typed value differed from what the setter had converted it to. * Fixed bug where ANSI style sequences were not correctly handled in `utils.truncate_line()`. + * Fixed bug where pyscripts could edit `cmd2.Cmd.py_locals` dictionary. + * Fixed bug where cmd2 set sys.path[0] for a pyscript to cmd2's working directory instead of the + script file's directory. + * Fixed bug where sys.path was not being restored after a pyscript ran. * Enhancements * Renamed set command's `-l/--long` flag to `-v/--verbose` for consistency with help and history commands. + * Setting the following pyscript variables: + * `__name__`: __main__ + * `__file__`: script path (as typed) ## 0.10.0 (February 7, 2020) * Enhancements -- cgit v1.2.1