The ability to enter a 2nd interactive Python console within an existing one via "cmd('py')" isn't helpful and could be harmful.
Recommend detecting if running in an interactive console, bypassing running a new one, and printing an error with something like:
def do_py(self):
if self._in_py:
self.perror("Recursively entering interactive Python consoles is not allowed.", traceback_war=False)
return
self._in_py = True
....
self._in_py = False
return self._should_quit
The ability to enter a 2nd interactive Python console within an existing one via "cmd('py')" isn't helpful and could be harmful.
Recommend detecting if running in an interactive console, bypassing running a new one, and printing an error with something like: