@@ -181,7 +181,7 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
181181 super ().__init__ (completekey = completekey , stdin = stdin , stdout = stdout )
182182
183183 # Attributes which should NOT be dynamically settable via the set command at runtime
184- # To prevent a user from altering these with the py/ipy commands, remove locals_in_py from the
184+ # To prevent a user from altering these with the py/ipy commands, remove self_in_py from the
185185 # settable dictionary during your applications's __init__ method.
186186 self .default_to_shell = False # Attempt to run unrecognized commands as shell commands
187187 self .quit_on_sigint = False # Quit the loop on interrupt instead of just resetting prompt
@@ -221,7 +221,7 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
221221 self .continuation_prompt = '> '
222222
223223 # Allow access to your application in embedded Python shells and scripts py via self
224- self .locals_in_py = False
224+ self .self_in_py = False
225225
226226 # Commands to exclude from the help menu and tab completion
227227 self .hidden_commands = ['eof' , '_relative_load' , '_relative_run_script' ]
@@ -3118,7 +3118,7 @@ def py_quit():
31183118 self .py_locals ['quit' ] = py_quit
31193119 self .py_locals ['exit' ] = py_quit
31203120
3121- if self .locals_in_py :
3121+ if self .self_in_py :
31223122 self .py_locals ['self' ] = self
31233123 elif 'self' in self .py_locals :
31243124 del self .py_locals ['self' ]
@@ -3238,7 +3238,7 @@ def load_ipy(cmd2_app: Cmd, py_bridge: PyBridge):
32383238 exec ("{} = py_bridge" .format (cmd2_app .py_bridge_name ))
32393239
32403240 # Add self variable pointing to cmd2_app, if allowed
3241- if cmd2_app .locals_in_py :
3241+ if cmd2_app .self_in_py :
32423242 exec ("self = cmd2_app" )
32433243
32443244 # Delete these names from the environment so IPython can't use them
0 commit comments