X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/578b389d6ec025acc887d4648df20a366f43882d..3eb1aad7ec1331a5331f03a1913156fdbed9fcc4:/wxPython/wx/py/shell.py diff --git a/wxPython/wx/py/shell.py b/wxPython/wx/py/shell.py index 841a0e47e6..2232fd59b0 100644 --- a/wxPython/wx/py/shell.py +++ b/wxPython/wx/py/shell.py @@ -179,7 +179,8 @@ class Shell(editwindow.EditWindow): editwindow.EditWindow.__init__(self, parent, id, pos, size, style) self.wrap() if locals is None: - locals = {} + import __main__ + locals = __main__.__dict__ # Grab these so they can be restored by self.redirect* methods. self.stdin = sys.stdin self.stdout = sys.stdout