def asyncevents(self, onoff):
     if MacOS.runtimemodel == 'macho':
         raise 'Unsupported in MachoPython'
     old = self._doing_asyncevents
     if old:
         MacOS.SetEventHandler()
         MacOS.SchedParams(*self.schedparams)
     if onoff:
         MacOS.SetEventHandler(self.dispatch)
         doint, dummymask, benice, howoften, bgyield = self.schedparams
         MacOS.SchedParams(doint, everyEvent, benice, howoften, bgyield)
     self._doing_asyncevents = onoff
     return old
Beispiel #2
0
 def __del__(self):
     if self._doing_asyncevents:
         self._doing_asyncevents = 0
         MacOS.SetEventHandler()
Beispiel #3
0
"A sort of application framework for the Mac"