Raphaël SEBAN | 31 Jan 09:20 2015

Weird bug in input widgets?

Hi all,

While working on my latest software (tkScenarist on GitHub), I 
encountered a really weird issue: once cleared, input widgets such as 
Text, Entry, ttk.Entry do *NOT* accept composite-accented letters 
(french ê, ë, etc) any more.

So, to get sure, I made the following test code:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from tkinter import *

def clear_all (event=None):
     # clear stringvars
     for svar in cvars:
     # end for
     # clear text widgets
     for wtext in texts:
         wtext.delete("1.0", END)
     # end for
# end def

def test (nb_of_widgets):
     global root, cvars, texts
     root = Tk()
     root.title("test #{}".format(nb_of_widgets))
(Continue reading)

Patrick Robertson | 28 Jan 08:20 2015

Tkinter colours lighter on OS X

I’m having a problem whereby every colour I declare in Tkinter (background colour, font colour etc.) is always a shade lighter when viewed on OS X.

Take for example the test code:

import Tkinter root = Tkinter.Tk() root.configure(bg="#000000") root.configure(borderwidth=20) root.geometry('%dx%d+%d+%d' % (200, 200, 200, 200)) frame = Tkinter.Frame(root, bg="#444444", borderwidth=20) frame.pack(fill=Tkinter.BOTH) frame2 = Tkinter.Frame(frame, bg="#999999", height=120) frame2.pack(fill=Tkinter.BOTH) root.mainloop()

If you run this on OS X and then open up DigitalColor Meter and hover over each box, you will see that the two lighter grey colours don't match what is in the code.
If I hover over the the inner square, I get #A9A9A9 (instead of #999999), and the middle square gives #565656 (instead of #444444).
I also get the same thing for .gifs I load using Tkinter.PhotoImage(data=…). For images I have tried changing the sRGB/RGB setting of the image to no avail

I'm running OS X 10.9 with Python 2.7.8, Tc/Tk 8.5 (Tkinter specifies __version__ = '$Revision: 81008 $')
Has anybody else experienced this problem, and if so what is the right fix? Thanks

Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
Vasilis Vlachoudis | 22 Jan 17:24 2015

Text folding of text

Dear all,

I want to create a text box with folding capabilities.
To show/hide lines of text (probably using the elide function)
but when I hide the text I want it to be replaced by one line
+---- 10 lines folded ----
that extends to the full width of the text widget
and the editing is disabled on that line.

Is it possible to disable the editing on specific lines/tags?

Thanks in advance

Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
thomas hahn | 4 Jan 05:56 2015

Help with finding tutors for Python, Linux, R, Perl, Octave, MATLAB and/or Cytoscape for yeast microarray analysis, next generation sequencing and constructing gene interaction networks

Help with finding tutors for Python, Linux, R, Perl, Octave, MATLAB and/or Cytoscape for yeast microarray analysis, next generation sequencing and constructing gene interaction networks




I am a visually impaired bioinformatics graduate student using microarray data for my master’s thesis aimed at deciphering the mechanism by which the yeast wild type can suppress the rise of free reactive oxygen species (ROS) induced by caloric restriction (CR) but the Atg15 and Erg6 knockout mutant cannot.


Since my remaining vision is very limited I need very high magnification.  But that makes my visual field very small.  Therefore I need somebody to teach me how to use these programming environments, especially for microarray analysis, next generation sequencing and constructing gene and pathway interaction networks.  This is very difficult for me to figure out without assistance because Zoomtext, my magnification and text to speech software, on which I am depending because I am almost blind, has problems reading out aloud many programming related websites to me.  And even those websites it can read, it can only read sequentially from left to right and then from top to bottom.  Unfortunately, this way of acquiring, finding, selecting and processing new information and answering questions is too tiresome, exhausting, ineffective and especially way too time consuming for graduating with a PhD in bioinformatics before my funding runs out despite being severely limited by my visual disability.  I would also need help with writing a good literature review and applying the described techniques to my own yeast Affimetrix microarray dataset because I cannot see well enough to find all relevant publications on my own.


Some examples for specific tasks I urgently need help with are:


1.    Analyzing and comparing the three publically available microarray datasets that can be accessed at:

A.    http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE41860

B.    http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE38635

C.   http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE9217


2.    Learning how to use the Affymetrics microarray analysis software for the Yeast 2 chip, which can be found at http://www.affymetrix.com/support/technical/libraryfilesmain.affx


3.    For Cytoscape I need somebody, who can teach me how to execute the tutorials at the following links because due to my very limited vision field I cannot see tutorial and program interface simultaneously.

A.    http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Introduction_to_Cytoscape_3.1-part2#Importing_and_Exploring_Your_Data

B.    http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Filtering_and_Editing_in_Cytoscape_3

C.   http://cytoscape.org/manual/Cytoscape2_8Manual.html#Import%20Fixed-Format%20Network%20Files

D.   http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats


4.    Learning how to use the TopGo R package to perform statistical analysis on GO enrichments.


Since I am legally blind the rehab agency is giving me money to pay tutors for this purpose.  Could you please help me getting in touch regarding this with anybody, who could potentially be interested in teaching me one on one thus saving me time for acquiring new information and skills, which I need to finish my thesis on time, so that I can remain eligible for funding to continue in my bioinformatics PhD program despite being almost blind?  The tutoring can be done remotely via TeamViewer 5 and Skype.  Hence, it does not matter where my tutors are physically located.  Currently I have tutors in Croatia and UK.  But since they both work full time jobs while working on their PhD dissertation they only have very limited time to teach me online.  Could you therefore please forward this request for help to anybody, who could potentially be interested or, who could connect me to somebody, who might be, because my graduation and career depend on it?  Who else would you recommend me to contact regarding this?  Where else could I post this because I am in urgent need for help?


Could you please contact me directly via email at Thomas.F.Hahn2 <at> gmail.com and/or Skype at tfh002 because my text to speech software has problems to read out this website aloud to me?

I thank you very much in advance for your thoughts, ideas, suggestions, recommendations, time, help, efforts and support.

With very warm regards,


Thomas Hahn

1)    Graduate student in the Joint Bioinformatics Program at the University of Arkansas at Little Rock (UALR) and the University of Arkansas Medical Sciences (UAMS) &

2)    Research & Industry Advocate, Founder and Board Member of RADISH MEDICAL SOLUTIONS, INC. (http://www.radishmedical.com/thomas-hahn/)


Primary email: Thomas.F.Hahn2 <at> gmail.com

Cell phone: 318 243 3940

Office phone: 501 682 1440

Office location: EIT 535

Skype ID: tfh002

Virtual Google Voice phone to reach me while logged into my email (i.e. Thomas.F.Hahn2 <at> gmail.com), even when having no cell phone reception, e.g. in big massive buildings:  (501) 301-4890


Web links:


1)      https://ualr.academia.edu/ThomasHahn

2)      https://www.linkedin.com/pub/thomas-hahn/42/b29/42

3)      http://facebook.com/Thomas.F.Hahn

4)      https://twitter.com/Thomas_F_Hahn


Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
Andrew Zane | 30 Dec 09:01 2014

Re: making tkFileDialog and tkMessageBox modal on Win32

I had to add a little bit to make the dialog modal to the parent. So anyway, here’s to helping! : )
My comments are prefaced with an #A:, and my modifications are surrounded by the #A tag, #A - #/A, that is.

def tk_wrapgrab(tk, f, kw):
    #retrieved from: http://grokbase.com/t/python/tkinter-discuss/05468hr5qs/making-tkfiledialog-and-tkmessagebox-modal-on-win32
        # Wrap a dialog in a grab pair.
        # Use to make tkFileDialog and tkMessageBox application-modal.
        # Not needed for tkSimpleDialog.
        # tk - grab target, this is what will wait for the tkDialog to close
        # f - tkFileDialog.askopenfilename, tkMessageBox.showinfo, etc.
        # kw - dictionary of key-word arguments to f
    kw['parent'] = tk #A: No need to specify parent then. Grab target here is synonomous to parent.
    tk.grab_set() #A: Grab parent, making parent the only active window (of application) while tkDialog is open.
    retval = f(**kw)
    tk.wait_variable(retval) #A: Parent wait for the variable, disabling parent until tkDialog returns.
Thus, tkDialogs are application-modal.
                             #      If we did a global grab, the tkDialog would be globally-modal.
    return retval
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
inq1ltd | 29 Dec 19:49 2014

Event debugger


If I understand your problem correctly, I may 
try this.

I expect that your code is in a class. 

class Kdata:
    vkey = ''  # add this under you class
               # definition

   # add lines of code
   # more lines of code

   # make your binder but before the binder
     add KdataSB.vkey =

   like this;
   KdataSB.vkey = something.bind('<F12>',

   # many more lines of code
   # somewhere in this code  write

    import module file 
    from module file import KdataSB

    # write 
    print KdataSB.vkey, 'line xxx\n' 

    whenever I run my program, the above 
    print statement sends to output, this
    number, 30555847260

    # you will get something else

    you should be able to write this print  
    statement where ever you think the binder
    should exist. You should get the same
    number in each place

for inqvista.com
Vasilis Vlachoudis | 28 Dec 16:45 2014

Event debugger

Hi all,

in my application I have a lost <Double-1> event in a multi listbox to
activate . The program is quite long
about 100000 lines of code and I cannot find where the event is lost.
My su
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
George Korony | 24 Dec 21:05 2014

msvcrt - Button problem

I am running Python on Windows. (Do not ask why....I have to!)
In the following code I do register the keyboard hit for the first run of the program. But if I wait and then restart the run with the button command the hit does not register.
Of course the program has to be run "directly" - not using the GUI.
Is there a solution for my problem?
Thanks, George

from Tkinter import *
from time import sleep
import msvcrt

class Test(Frame):    
    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.parent = master
        self.button= Button(self, text="start",
        relief="raised",bd=5, padx=10, command=self.doLoop)
    def doLoop(self):
        while n>0:          
            print "n: ",n
            print "hit: ",msvcrt.kbhit()           

George Korony
AVX Corporation
801 17th Ave S.
Myrtle Beach, SC 29578
Phone: 843-444-2859
Fax: 843-444-2809
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
rajat das | 29 Oct 08:38 2014

update image on pressing button

Dear All,

I am new in python programming, kindly help me out.

Problem:  Basically as user press the "Next image button" the image should get refreshed by the next image from the specified path and so on.  The problem is on pressing the button the image is coming below of the previous image not on top of it. Basically I want the images should slide on pressing the next button. I am sharing my code for understanding. You need few "bmp" files and set the path according to which path need to set in the program.
from Tkinter import *
from PIL import Image, ImageTk

root = Tk()

def Click():

image = Image.open("C:/Users/Slide2.bmp")
photo = ImageTk.PhotoImage(image)

label = Label(root,image=photo)
label.image = photo # keep a reference!

image = Image.open("C:/Users/Slide1.bmp")
photo = ImageTk.PhotoImage(image)
label = Label(root,image=photo)

label.image = photo # keep a reference!

labelframe = LabelFrame(root)
labelframe.pack(fill="both", expand="yes")

left = Label(labelframe)

button=Button(labelframe, padx = 5, pady = 5, text="Next",command = Click)
button.pack(side = RIGHT)

R1 = Radiobutton(labelframe, text="Choice 1", value=1)
R1.pack(side = LEFT)

R2 = Radiobutton(labelframe, text="Choice 2", value=2)
R2.pack(side = LEFT)


Rajat Das
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
Juan Christian | 27 Oct 21:10 2014

Change menubar color?

I have this simple code:

from tkinter import *

root = Tk()
root.title("Steam Trader")
root.minsize(500, 800)
root.maxsize(500, 0)

menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Open", command=None)
filemenu.add_command(label="Save", command=None)
menubar.add_cascade(label="File", menu=filemenu)

root.config(bg='#2A2C2B', menu=menubar)

And I want to change the menu color, is it possible?

Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
Mark Lutz | 26 Sep 20:45 2014

tkinter on android?

Has there been any work on porting tkinter to Android
yet?  The usual searches come up empty, but the following
looks like a promising development in the Tcl/Tk front:


and there may be a few usable Python 2.X and 3.X Android 
ports to build on ("Python for Android" search results
turn up SL4A, QPython, and others).

This may or may not be feasible, but there are a lot of 
tkinter GUIs which would be great to have on an Android 
device; personally, I have tkinter-based text editors, 
clocks, email clients, calculators, and now calendars 
that see daily action elsewhere.

--Mark Lutz  (http://learning-python.com, http://www.rmi.net/~lutz)