| 64 | self.func() |
| 65 | |
| 66 | class EventLoopRunner(object): |
| 67 | |
| 68 | def Run(self, time): |
| 69 | self.evtloop = wx.EventLoop() |
| 70 | self.timer = EventLoopTimer(self.check_stdin) |
| 71 | self.timer.Start(time) |
| 72 | self.evtloop.Run() |
| 73 | |
| 74 | def check_stdin(self): |
| 75 | if stdin_ready(): |
| 76 | self.timer.Stop() |
| 77 | self.evtloop.Exit() |
| 78 | |
| 79 | def inputhook_wx2(): |
| 80 | """Run the wx event loop, polling for stdin. |