Issue with wxPython GUI

tarun tarundevnani at gmail.com
Tue Nov 13 02:35:29 EST 2007


Hi All,

I've a probelm and solution for it to build the preface. Below it is the new
problem I'm facing. Can someone help me out?

*Problem:* I've have created a GUI (using wxPython widgets) where in I've a
message log window (A TextCtrl window).
I've a router.dll that helps me putting in message onto a channel. In my
script that generates the GUI,
I want to continuously poll the channel and populate the messages from the
channel to the message log window.

For this I've  to put a while (1) loop, but when I do this, the GUI doesn't
come up. I see the GUI coming
when while(1) is removed. Is there any issue with usage of app.mainloop and
while(1) together.

*Solution: *I used:
    self.Bind (wx. EVT_IDLE, self.OnIdle)

And in the OnIdle function, I check if the data is available on the channel.

Referred: http://wiki.wxpython.org/LongRunningTasks


*New Problem: *I am opening and executing a script from the GUI. The script
has a many log messages,
which it posts on some shared memory. The GUI reads the messages from the
shared memory,
in the Idle loop. But the script is huge and so the logging is not run-time.

Rather this happens only after the script has executed. Moreover, the GUI
becomes
un-responsive till the script has completely executed.
Do you have any suggestions for this?

Thanks & Regards,
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071113/90ba00b0/attachment.html>


More information about the Python-list mailing list