mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist and representing pathnames in a os.separator-neutral format. These shouldn't interfere too much with Just's work on the next generation IDE, I hope.
This commit is contained in:
parent
c71efe0116
commit
815d2bf067
8 changed files with 71 additions and 38 deletions
|
@ -75,9 +75,11 @@ class ConsoleTextWidget(W.EditText):
|
|||
if char == Wkeys.returnkey:
|
||||
text = self.get()[self._inputstart:selstart]
|
||||
text = string.join(string.split(text, "\r"), "\n")
|
||||
saveyield = MacOS.EnableAppswitch(0)
|
||||
if hasattr(MacOS, 'EnableAppswitch'):
|
||||
saveyield = MacOS.EnableAppswitch(0)
|
||||
self.pyinteractive.executeline(text, self, self._namespace)
|
||||
MacOS.EnableAppswitch(saveyield)
|
||||
if hasattr(MacOS, 'EnableAppswitch'):
|
||||
MacOS.EnableAppswitch(saveyield)
|
||||
selstart, selend = self.getselection()
|
||||
self._inputstart = selstart
|
||||
|
||||
|
@ -275,13 +277,15 @@ class PyOutput:
|
|||
self.w.bind("<activate>", self.activate)
|
||||
|
||||
def write(self, text):
|
||||
oldyield = MacOS.EnableAppswitch(-1)
|
||||
if hasattr(MacOS, 'EnableAppswitch'):
|
||||
oldyield = MacOS.EnableAppswitch(-1)
|
||||
try:
|
||||
self._buf = self._buf + text
|
||||
if '\n' in self._buf:
|
||||
self.flush()
|
||||
finally:
|
||||
MacOS.EnableAppswitch(oldyield)
|
||||
if hasattr(MacOS, 'EnableAppswitch'):
|
||||
MacOS.EnableAppswitch(oldyield)
|
||||
|
||||
def flush(self):
|
||||
self.show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue