def main():
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:
echo.mainloop(everyEvent, 0)
except Quit:
pass
finally:
- MacOS.EnableAppswitch(yield) # Let Python have a go at events
+ apply(MacOS.SchedParams, savepars) # Let Python have a go at events
echo.close()
print 'Communications Toolbox not available'
sys.exit(1)
# Disable Python's event processing (we do that)
- MacOS.EnableAppswitch(0)
+ MacOS.SchedParams(1, 0)
print 'Minimal terminal emulator V1.0'
print '(type command-Q to exit)'
print
def main():
echo = EchoServer()
- yield = MacOS.EnableAppswitch(-1) # Disable Python's own "event handling"
+ saveparams = MacOS.SchedParams(0, 0) # Disable Python's own "event handling"
try:
echo.mainloop(everyEvent, 0)
finally:
- MacOS.EnableAppswitch(yield) # Let Python have a go at events
+ apply(MacOS.SchedParams, saveparams) # Let Python have a go at events
echo.close()
import sys
import MacOS
-MacOS.EnableAppswitch(0)
+MacOS.SchedParams(1, 0)
def aehandler(request, reply):
tosend = []