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
Exemplo n.º 2
0
 def __del__(self):
     if self._doing_asyncevents:
         self._doing_asyncevents = 0
         MacOS.SetEventHandler()
Exemplo n.º 3
0
"A sort of application framework for the Mac"