From c26f4b9bd2b00279b6f0f0bbf027c72cafaae5b6 Mon Sep 17 00:00:00 2001 From: tvoid Date: Mon, 7 Apr 2008 14:17:24 -0600 Subject: testing wxpython idle event timing (too slow) --- gsm-tvoid/src/python/gsm_scan.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gsm-tvoid/src') diff --git a/gsm-tvoid/src/python/gsm_scan.py b/gsm-tvoid/src/python/gsm_scan.py index 5d48ce5..43331e1 100755 --- a/gsm-tvoid/src/python/gsm_scan.py +++ b/gsm-tvoid/src/python/gsm_scan.py @@ -383,6 +383,9 @@ class app_flow_graph(stdgui.gui_flow_graph): self.t1.Start(5000,0) self.frame.Bind(wx.EVT_TIMER, self.on_tick) + #bind the idle routing for message_queue processing + self.frame.Bind(wx.EVT_IDLE, self.on_idle) + def _set_status_msg(self, msg): self.frame.GetStatusBar().SetStatusText(msg, 0) @@ -428,7 +431,7 @@ class app_flow_graph(stdgui.gui_flow_graph): callback=self.set_channel) vbox.Add(hbox, 0, wx.EXPAND) - + def set_freq(self, freq): @@ -491,7 +494,10 @@ class app_flow_graph(stdgui.gui_flow_graph): if self.print_status: self.print_stats() - + + def on_idle(self, event): + print "Idle.\n"; + def main (): app = stdgui.stdapp(app_flow_graph, "GSM Scanner", nstatus=1) app.MainLoop() -- cgit v1.2.3