From 906feb79ba54fde2b0635c321c659922559779f3 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sat, 26 May 2018 21:42:02 -0400 Subject: Fixed conditional.py script Also: - Made self.locals_in_py = True for main.py and examples/python_scripting.py - This makes debugging easier in the embedded IPython shell provided by the opt-in ipy command --- examples/scripts/conditional.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/scripts/conditional.py') diff --git a/examples/scripts/conditional.py b/examples/scripts/conditional.py index 1eeeadba..87cd10ac 100644 --- a/examples/scripts/conditional.py +++ b/examples/scripts/conditional.py @@ -24,16 +24,16 @@ else: original_dir = os.getcwd() # Try to change to the specified directory -cmd('cd {}'.format(directory)) +app('cd {}'.format(directory)) # Conditionally do something based on the results of the last command if self._last_result: print('\nContents of directory {!r}:'.format(directory)) - cmd('dir -l') + app('dir -l') # Change back to where we were print('Changing back to original directory: {!r}'.format(original_dir)) - cmd('cd {}'.format(original_dir)) + app('cd {}'.format(original_dir)) else: # cd command failed, print a warning print('Failed to change directory to {!r}'.format(directory)) -- cgit v1.2.1