473,785 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Proposal for thread-safe Tkinter

Allen Taylor wrote:
I was given the task of upgrading a Python/Tkinter GUI application to
the latest versions of Python and Tk. After a while, I realized that the
application had not been written in a thread-safe manner. Multiple
threads would simply use the Tk object directly. The application
apparently ran fine (i.e., didn't crash!) using older versions of Python
(2.2) and Tk (8.3), but it started to have serious problems (i.e.,
crashing) after using the latest versions.

The problem is that there isn't enough budget to fix the whole
application. So, I invested a bit of time to develop mtTkinter, a
thread-safe version of Tkinter. Importing mtTkinter actually modifies
the original Tkinter in such a way to make it thread-safe, recognizing
and diverting out-of-thread calls to the Tk object creation thread via a
queue and an 'after' event. I think it works quite well, requiring
basically no changes to the application other than to import mtTkinter
instead of (or in addition to) Tkinter. Even packages that use Tkinter
(e.g., Pmw) benefit.

I would like to contribute this module (single file, about 160 lines) to
the Python community, but I don't know how. I'm new to Python and am not
initiated in the deep Pythonic developer world. Can someone give me some
pointers? Many thanks.
You can publish it in the Python package index - see

http://pypi.python.org/pypi/

If you want to have it considered for inclusion into future versions of
Python then you should post a bug to bugs.python.org wiht your patch as
an attachment and the test of the above mail as a rationale for the change.

Thanks for going to these lengths to contribute!

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Oct 27 '08 #1
0 917

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

Similar topics

4
1671
by: Rhamphoryncus | last post by:
First a bit about myself. I've been programming in python several years now, and I've got several more years before that with C. I've got a lot of interest in the more theoretical stuff (language design, component architectures, etc). Of late my focus has been on concurrent operations (and on how to design a GUI architecture, but that's not what this post is about). I've looked at threads, and the inability to kill them easily was a...
15
2598
by: Ralf W. Grosse-Kunstleve | last post by:
****************************************************************************** This posting is also available in HTML format: http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html ****************************************************************************** Hi fellow Python coders, I often find myself writing:: class grouping:
8
1739
by: Micah Elliott | last post by:
I also have this living as a wiki <http://tracos.org/codetag/wiki/Pep> if people would like to add comments there. I might try to capture there feedback from this group anyway. First try at a PEP -- thanks for any feedback! Please add **NOTE:** comments to the bottom of this wiki document using `WikiRestructuredText`:trac:. =======================================
23
6421
by: Shane Hathaway | last post by:
Here's a heretical idea. I'd like a way to import modules at the point where I need the functionality, rather than remember to import ahead of time. This might eliminate a step in my coding process. Currently, my process is I change code and later scan my changes to make matching changes to the import statements. The scan step is error prone and time consuming. By importing inline, I'd be able to change code without the extra scan...
9
2035
by: corey.coughlin | last post by:
Alright, so I've been following some of the arguments about enhancing parallelism in python, and I've kind of been struck by how hard things still are. It seems like what we really need is a more pythonic approach. One thing I've been seeing suggested a lot lately is that running jobs in separate processes, to make it easy to use the latest multiprocessor machines. Makes a lot of sense to me, those processors are going to be more and...
12
2767
by: Ioannis Vranos | last post by:
Perhaps a mechanism can be introduced in the C++0x/1x standard, something simple like defining a function as: void somefunc(void) throw() { // ... }
1
1767
by: Bruce Frederiksen | last post by:
I wanted to make everybody aware that I've posted a (rather long and involved) PEP proposal for adding micro-threading to Python on python-ideas for feedback and review. In a nutshell, this proposal implements the Twisted Deferred/Reactor at the C level so that the Python programmer gets the advantages that Twisted offers without having to write their code in an event driven style. Thus, legacy Python code not written in the Twisted...
7
1072
by: python-pep | last post by:
Hi, sorry, I have these ideas for longer than 10 years, please have a look on it and comment on it. Thx. ---- This is another proposal for introducing types into Python.
56
6778
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under 6.4.2(2) : case constant-expression : I propose that the case expression of the switch statement be changed from "integral constant-expression" to "integral expression".
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.