]> granicus.if.org Git - python/commitdiff
Replaced MacOS.EnableAppswitch by MacOS.SchedParams
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Jun 1997 10:49:56 +0000 (10:49 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Jun 1997 10:49:56 +0000 (10:49 +0000)
Mac/Lib/test/AEservertest.py
Mac/Lib/test/ctbtest.py
Mac/Lib/test/echo.py
Mac/Lib/test/tae.py

index 75137380bf3442a06a2492b9b381b4751db1263e..1e3e508a4fb53a381f8f6a3374c8b7ef94a8be61 100644 (file)
@@ -42,14 +42,14 @@ def myaskstring(str, default=''):
 
 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()
 
 
index 0f3cd90fc2b01e2b5ab19bdafafddf6a9d9a3bc3..cb1b5068e0820ac4be43365ca5b62719bf889ea9 100644 (file)
@@ -16,7 +16,7 @@ def main():
                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
index 7376238b3ebf2ed0e929a1f9451537591b685d7d..1bad3e137d4ed5192af7d5dc468db5c696e11357 100644 (file)
@@ -33,11 +33,11 @@ def mymessage(str):
 
 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()
 
 
index 73c36b924180da86bf0112197fd033cd78cd8f16..4789672494fb28c49f8e01caf74e91f0ec72a59b 100644 (file)
@@ -11,7 +11,7 @@ import macfs
 import sys
 import MacOS
 
-MacOS.EnableAppswitch(0)
+MacOS.SchedParams(1, 0)
 
 def aehandler(request, reply):
        tosend = []