Skip to content

Commit

Permalink
Raw_input bug fix, and colorizing bug fix
Browse files Browse the repository at this point in the history
Fixes a problem where raw_input cancelled would prevent raw_input from
ever working again.  Fixes a problem where colorizing would disappear
due to a race condition.  Both are from sportsracer48 see
https://github.com/sportsracer48/jes/commits/master
  • Loading branch information
mjguzdial committed May 11, 2015
1 parent 2a2abc2 commit 56b6799
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jes/python/jes/core/interpreter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
6 changes: 5 additions & 1 deletion jes/python/jes/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 56b6799

Please sign in to comment.