diff --git a/jes/python/jes/core/interpreter/__init__.py b/jes/python/jes/core/interpreter/__init__.py index a08fd09..b7fa6a9 100644 --- a/jes/python/jes/core/interpreter/__init__.py +++ b/jes/python/jes/core/interpreter/__init__.py @@ -172,6 +172,8 @@ def cleanup(self): def tryStop(self): self.stopSignal = True + from jes.gui.commandwindow.prompt import promptService + promptService.commandWindow.cancelPrompt() self.stop() diff --git a/jes/python/jes/program.py b/jes/python/jes/program.py index 2e7f019..dc70c5e 100644 --- a/jes/python/jes/program.py +++ b/jes/python/jes/program.py @@ -28,6 +28,7 @@ from code import compile_command from tokenize import TokenError from java.lang import System +from java.lang import Thread from javax.swing import JOptionPane from jes.bridge.replbuffer import REPLBuffer from jes.bridge.terpactions import addInterpreterActions @@ -143,7 +144,10 @@ def getVarsToHighlight(self): def initializeInterpreter(self, terp): startup = JESResources.getPathTo('python/jes/user-startup.py') - terp.runFile(startup, False) + #terp.runFile(startup, False) + #Henry Rachootin did this. This way, everything will be loaded before we start using it. + startupThread = terp.runFile(startup, False) + startupThread.join() ########################################################################## # Function name: loadFile