mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Replaced MacOS.EnableAppswitch by MacOS.SchedParams
This commit is contained in:
parent
caa7c46ac4
commit
7fb76e0f8a
4 changed files with 6 additions and 6 deletions
|
|
@ -42,14 +42,14 @@ def myaskstring(str, default=''):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
echo = EchoServer()
|
echo = EchoServer()
|
||||||
yield = MacOS.EnableAppswitch(-1) # Disable Python's own "event handling"
|
savepars = MacOS.SchedParams(0, 0) # Disable Python's own "event handling"
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
echo.mainloop(everyEvent, 0)
|
echo.mainloop(everyEvent, 0)
|
||||||
except Quit:
|
except Quit:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
MacOS.EnableAppswitch(yield) # Let Python have a go at events
|
apply(MacOS.SchedParams, savepars) # Let Python have a go at events
|
||||||
echo.close()
|
echo.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ def main():
|
||||||
print 'Communications Toolbox not available'
|
print 'Communications Toolbox not available'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# Disable Python's event processing (we do that)
|
# Disable Python's event processing (we do that)
|
||||||
MacOS.EnableAppswitch(0)
|
MacOS.SchedParams(1, 0)
|
||||||
print 'Minimal terminal emulator V1.0'
|
print 'Minimal terminal emulator V1.0'
|
||||||
print '(type command-Q to exit)'
|
print '(type command-Q to exit)'
|
||||||
print
|
print
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ def mymessage(str):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
echo = EchoServer()
|
echo = EchoServer()
|
||||||
yield = MacOS.EnableAppswitch(-1) # Disable Python's own "event handling"
|
saveparams = MacOS.SchedParams(0, 0) # Disable Python's own "event handling"
|
||||||
try:
|
try:
|
||||||
echo.mainloop(everyEvent, 0)
|
echo.mainloop(everyEvent, 0)
|
||||||
finally:
|
finally:
|
||||||
MacOS.EnableAppswitch(yield) # Let Python have a go at events
|
apply(MacOS.SchedParams, saveparams) # Let Python have a go at events
|
||||||
echo.close()
|
echo.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import macfs
|
||||||
import sys
|
import sys
|
||||||
import MacOS
|
import MacOS
|
||||||
|
|
||||||
MacOS.EnableAppswitch(0)
|
MacOS.SchedParams(1, 0)
|
||||||
|
|
||||||
def aehandler(request, reply):
|
def aehandler(request, reply):
|
||||||
tosend = []
|
tosend = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue