Hi everybody... I have an app that has to controll some ascii files
every 10/30 seconds... I was planning to have an GUI using wxpython.
The problems is that i wasn't able to manage my application loop and
the wxApp loop, so my interface is always freezing...
My app do something like this:
- creates a new wx and wxframe instance
- loads some configuration info
- starts looping every 30 seconds (while True: sleep(30); do something,
bla,bla)
- update some labels and textboxes on my frame...

On every loop step, if i find some info in those ascii files i want to
change some labels on my wxFrame... But my frame just freezes...
because of the loop.

Any hint?

I'll post some of the code down here...

"
...
loadSystemConfiguration() # Carico la configurazione delle tag
dell'intero sistema
                self.loadMonitorConfiguration() # Carico le configurazioni del
monitor
# monitorGUI.monitorGUI is my wxFrame class...
self.mG = monitorGUI.monitorGUI(None, app_path, screen_dx=1024,
screen_dy=768)
self.mG.Show()

self.monitorize = True
while self.monitorize:
        time.sleep(30)
        <<<do my stuff>>>
        if something:
              self.mG.status.SetValue("Registering new event...")
              self.mG.Update()

"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to