kamal_17 | 24 Feb 15:38 2015

Redirecting command prompt to a gui realtime


I want to redirect output of a script into a gui window in realtime.

Please share some code snippet where u have encountered similar issue.


View this message in context: http://python.6.x6.nabble.com/Redirecting-command-prompt-to-a-gui-realtime-tp5087377.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
Shondra Siskin | 4 Feb 18:13 2015

corret sa


Goutte Vignole 69490 St Forgeux
+33 474 18 13 46
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
Paul Malherbe | 17 Feb 16:41 2015

Tkinter grid_info()

Please could someone tell me why this is not working?

from Tkinter import *

root = Tk()
e = Entry(root)
e.grid(column=0, row=0)
info = e.grid_info()
print "row:", info["row"], "column:", info["column"]

Running this displays the following error:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    grid_info = e.grid_info()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2000, in grid_info
    self.tk.call('grid', 'info', self._w))
TypeError: coercing to Unicode: need string or buffer, _tkinter.Tcl_Obj
Raphaël SEBAN | 2 Feb 12:39 2015

Re: Tkinter-discuss Digest, Vol 131, Issue 1

Great stuff, Kevin!

Thanks a lot!


Le 02/02/2015 12:00, tkinter-discuss-request <at> python.org a écrit :
> Message: 2
> Date: Sun, 01 Feb 2015 11:44:07 -0500
> From: Kevin  Walzer <kw <at> codebykevin.com>
> To: tkinter-discuss <at> python.org
> Subject: Re: [Tkinter-discuss] Weird bug in input widgets? (Michael
> 	Lange)
> Message-ID: <54CE57D7.7070802 <at> codebykevin.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> On 2/1/15 9:13 AM, Rapha?l SEBAN wrote:
>> I don't know if there is a bugtracker for Tkinter somewhere.
>> I don't even know if Tkinter is still in development, in fact.
>> Is it?
> Tkinter is just a wrapper around Tk. Here is the place to report Tk bugs:
> http://core.tcl.tk/tk/reportlist
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
(Continue reading)

Raphaël SEBAN | 1 Feb 15:13 2015

Re: Weird bug in input widgets? (Michael Lange)

Hi Michael,

Thank you for your reply, but I'm on a PC / Linux Ubuntu 14.10 with 
Tkinter/Tk version 8.6 for Python3, standard installation, no specific 

I'm working this way to fit as much as possible with customers' machines 
who'd use my apps, generally without making any changes to their 
platform pre-installed packages.

I'm not looking for a bug fix on my own, I'd like to acknowledge 
Tkinter's dev team that this bug exists, hoping that in some late days 
it will be fixed everywhere for everybody. :)

I thought tkinter-discuss was the best place for this.
I don't know if there is a bugtracker for Tkinter somewhere.
I don't even know if Tkinter is still in development, in fact.

Is it?


Le 31/01/2015 12:00, tkinter-discuss-request <at> python.org a écrit :
> Send Tkinter-discuss mailing list submissions to
> 	tkinter-discuss <at> python.org
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.python.org/mailman/listinfo/tkinter-discuss
> or, via email, send a message with subject or body 'help' to
> 	tkinter-discuss-request <at> python.org
(Continue reading)

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