File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ def myaskstring(str, default=''):
4242
4343def main ():
4444 echo = EchoServer ()
45- yield = MacOS .EnableAppswitch ( - 1 ) # Disable Python's own "event handling"
45+ savepars = MacOS .SchedParams ( 0 , 0 ) # Disable Python's own "event handling"
4646 try :
4747 try :
4848 echo .mainloop (everyEvent , 0 )
4949 except Quit :
5050 pass
5151 finally :
52- MacOS .EnableAppswitch ( yield ) # Let Python have a go at events
52+ apply ( MacOS .SchedParams , savepars ) # Let Python have a go at events
5353 echo .close ()
5454
5555
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def main():
1616 print 'Communications Toolbox not available'
1717 sys .exit (1 )
1818 # Disable Python's event processing (we do that)
19- MacOS .EnableAppswitch ( 0 )
19+ MacOS .SchedParams ( 1 , 0 )
2020 print 'Minimal terminal emulator V1.0'
2121 print '(type command-Q to exit)'
2222 print
Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ def mymessage(str):
3333
3434def main ():
3535 echo = EchoServer ()
36- yield = MacOS .EnableAppswitch ( - 1 ) # Disable Python's own "event handling"
36+ saveparams = MacOS .SchedParams ( 0 , 0 ) # Disable Python's own "event handling"
3737 try :
3838 echo .mainloop (everyEvent , 0 )
3939 finally :
40- MacOS .EnableAppswitch ( yield ) # Let Python have a go at events
40+ apply ( MacOS .SchedParams , saveparams ) # Let Python have a go at events
4141 echo .close ()
4242
4343
Original file line number Diff line number Diff line change 1111import sys
1212import MacOS
1313
14- MacOS .EnableAppswitch ( 0 )
14+ MacOS .SchedParams ( 1 , 0 )
1515
1616def aehandler (request , reply ):
1717 tosend = []
You can’t perform that action at this time.
0 commit comments