home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / api.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-10-05  |  1.5 KB  |  46 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. import wx
  5.  
  6. def guilogin(trampoline, username, password):
  7.     print 'logging in', username
  8.     yield None
  9.  
  10.  
  11. def wait(ms):
  12.     print 'wait', ms
  13.     return Wait(ms)
  14.  
  15.  
  16. class Scheduler(object):
  17.     pass
  18.  
  19.  
  20. class Wait(Scheduler):
  21.     stop_trampoline = True
  22.     
  23.     def __init__(self, ms):
  24.         self.ms = ms
  25.  
  26.     
  27.     def schedule(self, trampoline):
  28.         self.trampoline = trampoline
  29.         self.timer = wx.PyTimer(self.on_timer)
  30.         print 'starting a timer for %d ms' % self.ms
  31.         self.timer.Start(self.ms, True)
  32.  
  33.     
  34.     def on_timer(self):
  35.         print 'on_timer'
  36.         self.timer.Stop()
  37.         trampoline = self.trampoline
  38.         del self.trampoline
  39.         trampoline.run()
  40.  
  41.     
  42.     def __repr__(self):
  43.         return '<Wait %dms>' % self.ms
  44.  
  45.  
  46.