473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wxPython, searching, and threads

Hello! I am writing a search engine with wxPython as the GUI. As the
search thread returns items, it adds them to a Queue which is picked
up by the main GUI thread calling itself recursively with
wx.CallAfter. These are then added to a ListCtrl. This works fine for
small searches, but with larger and longer searchs the GUI is clogged
and won't respond. I suspect (I may be wrong) that there are so many
results being sent to the ListCtrl that the event loop doesn't have
time to respond to events. I've tried buffering the results before
sending them to the GIU, but that doesn't help at all. Please advise.

Jul 18 '07 #1
1 1720
On Jul 18, 11:38 am, Benjamin <musiccomposit...@gmail.comwrote:
Hello! I am writing a search engine with wxPython as the GUI. As the
search thread returns items, it adds them to a Queue which is picked
up by the main GUI thread calling itself recursively with
wx.CallAfter. These are then added to a ListCtrl. This works fine for
small searches, but with larger and longer searchs the GUI is clogged
and won't respond. I suspect (I may be wrong) that there are so many
results being sent to the ListCtrl that the event loop doesn't have
time to respond to events. I've tried buffering the results before
sending them to the GIU, but that doesn't help at all. Please advise.
The standard wxPython user's group reply to a question like this is,
check out http://wiki.wxpython.org/LongRunningTasks. I've used a
variation of what's on this page to create a fairly complex installer
than keeps a textctrl updated with its progress. Since the installer
runs for almost an hour, I think this method works great.

Admittedly, you work with threads, which is intimidating to some
degree and if you use WMI, then you'll need to use some special
commands to make it work in a thread.

The wxPython mailing list is here: http://www.wxpython.org/maillist.php

Hope that helps.

Mike

Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kevin Walzer | last post by:
I'm porting a Tkinter application to wxPython and had a question about wxPython's event loop. The Tkinter app provides a GUI to a command-line tool. It gathers user input, and opens an...
5
by: Benjamin | last post by:
I'm writing a search engine in Python with wxPython as the GUI. I have the actual searching preformed on a different thread from Gui thread. It sends it's results through a Queue to the results...
1
by: Benjamin | last post by:
Hello! I am writing a search engine with wxPython as the GUI. As the search thread returns items, it adds them to a Queue which is picked up by the main GUI thread calling itself recursively with...
12
by: bullockbefriending bard | last post by:
I am a complete ignoramus and newbie when it comes to designing and coding networked clients (or servers for that matter). I have a copy of Goerzen (Foundations of Python Network Programming) and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.