From mkieverpy at tlink.de Sun Jan 4 13:40:37 2015 From: mkieverpy at tlink.de (mkieverpy at tlink.de) Date: Sun, 04 Jan 2015 12:40:37 -0000 Subject: [Tkinter-discuss] =?utf-8?q?Event_debugger?= Message-ID: <3kFdZ95YrGz7LkX@mail.python.org> Hello Vasilis, >So my questions is, does it exist any event debugger so I can monitor >the events on a specific widget to find out what happens in between > the two clicks? if your on X11 xev (+ possibly a pipeline through grep) might be sufficient for your debugging needs. I'm not a heavy user of xev, though. Hope this helps, Matthias And Happy New Year to all the list :-) From Vasilis.Vlachoudis at cern.ch Mon Jan 5 11:44:22 2015 From: Vasilis.Vlachoudis at cern.ch (Vasilis Vlachoudis) Date: Mon, 5 Jan 2015 10:44:22 +0000 Subject: [Tkinter-discuss] Event debugger In-Reply-To: <3kFdZ95YrGz7LkX@mail.python.org> References: <3kFdZ95YrGz7LkX@mail.python.org> Message-ID: <0BC70B5D93E054469872FFD0FE07220E011ABFF3F5@CERNXCHG54.cern.ch> Happy new year Mattias, Is it possible to use xev to monitor another window's events? V. ________________________________________ From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern.ch at python.org] on behalf of mkieverpy at tlink.de [mkieverpy at tlink.de] Sent: 04 January 2015 13:40 To: tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Event debugger Hello Vasilis, >So my questions is, does it exist any event debugger so I can monitor >the events on a specific widget to find out what happens in between > the two clicks? if your on X11 xev (+ possibly a pipeline through grep) might be sufficient for your debugging needs. I'm not a heavy user of xev, though. Hope this helps, Matthias And Happy New Year to all the list :-) _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss at python.org https://mail.python.org/mailman/listinfo/tkinter-discuss From klappnase at web.de Mon Jan 5 13:00:08 2015 From: klappnase at web.de (Michael Lange) Date: Mon, 5 Jan 2015 13:00:08 +0100 Subject: [Tkinter-discuss] Event debugger In-Reply-To: <0BC70B5D93E054469872FFD0FE07220E011ABFF3F5@CERNXCHG54.cern.ch> References: <3kFdZ95YrGz7LkX@mail.python.org> <0BC70B5D93E054469872FFD0FE07220E011ABFF3F5@CERNXCHG54.cern.ch> Message-ID: <20150105130008.aea29658a3d33dc021bcbc90@web.de> Hi Vasilis, On Mon, 5 Jan 2015 10:44:22 +0000 Vasilis Vlachoudis wrote: > Happy new year Mattias, > > Is it possible to use xev to monitor another window's events? you can use this simple technique for that: import Tkinter from subprocess import Popen, PIPE import fcntl import os root = Tkinter.Tk() p = Popen(('xev', '-id', str(root.winfo_id())), stdout=PIPE) fcntl.fcntl(p.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK) def poll_events(): try: out = p.stdout.read() print out except IOError: pass root.after(100, poll_events) root.after(100, poll_events) root.mainloop() Unfortunately however, this way xev does *not* report mouse button events, probably because of the limitation described at http://www.rahul.net/kenton/events.html#LimitationsOf : "Limitations of xev Unfortunately, xev is not fool proof if you ask it to track events on a window it does not own (the -id mode). It receives these events by requesting them with Xlib's XSelectInput() function. This technique has three major limitations: grabs - If one client activates a server, pointer, or keyboard grab, then event reporting to all other clients will be affected. xev will not be able to report some (or all) events, even though the client activating the grab may be receiving them. non-maskable events - The X protocol does not allow certain events to be reported to clients other than the one that created the event window. Most of these events deal with selections. redirection events - The X protocol allows only one client to request certain events. xev cannot receive these if another client is receiving them. These events include window manager redirection events (e.g., substructure notify on the root window) and implicit passive grab events (e.g., mouse button presses). Users of xev must find alternate techniques for studying the above areas. The xscope and xmon programs, discussed in the next section, may be helpful. " A happy new year to all of you, and best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Live long and prosper. -- Spock, "Amok Time", stardate 3372.7 From Vasilis.Vlachoudis at cern.ch Mon Jan 5 14:57:12 2015 From: Vasilis.Vlachoudis at cern.ch (Vasilis Vlachoudis) Date: Mon, 5 Jan 2015 13:57:12 +0000 Subject: [Tkinter-discuss] Event debugger In-Reply-To: <20150105130008.aea29658a3d33dc021bcbc90@web.de> References: <3kFdZ95YrGz7LkX@mail.python.org> <0BC70B5D93E054469872FFD0FE07220E011ABFF3F5@CERNXCHG54.cern.ch>, <20150105130008.aea29658a3d33dc021bcbc90@web.de> Message-ID: <0BC70B5D93E054469872FFD0FE07220E011AC001AA@CERNXCHG54.cern.ch> Brilliant! This can be good to know V. ________________________________________ From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern.ch at python.org] on behalf of Michael Lange [klappnase at web.de] Sent: 05 January 2015 13:00 To: tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Event debugger Hi Vasilis, On Mon, 5 Jan 2015 10:44:22 +0000 Vasilis Vlachoudis wrote: > Happy new year Mattias, > > Is it possible to use xev to monitor another window's events? you can use this simple technique for that: import Tkinter from subprocess import Popen, PIPE import fcntl import os root = Tkinter.Tk() p = Popen(('xev', '-id', str(root.winfo_id())), stdout=PIPE) fcntl.fcntl(p.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK) def poll_events(): try: out = p.stdout.read() print out except IOError: pass root.after(100, poll_events) root.after(100, poll_events) root.mainloop() Unfortunately however, this way xev does *not* report mouse button events, probably because of the limitation described at http://www.rahul.net/kenton/events.html#LimitationsOf : "Limitations of xev Unfortunately, xev is not fool proof if you ask it to track events on a window it does not own (the -id mode). It receives these events by requesting them with Xlib's XSelectInput() function. This technique has three major limitations: grabs - If one client activates a server, pointer, or keyboard grab, then event reporting to all other clients will be affected. xev will not be able to report some (or all) events, even though the client activating the grab may be receiving them. non-maskable events - The X protocol does not allow certain events to be reported to clients other than the one that created the event window. Most of these events deal with selections. redirection events - The X protocol allows only one client to request certain events. xev cannot receive these if another client is receiving them. These events include window manager redirection events (e.g., substructure notify on the root window) and implicit passive grab events (e.g., mouse button presses). Users of xev must find alternate techniques for studying the above areas. The xscope and xmon programs, discussed in the next section, may be helpful. " A happy new year to all of you, and best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Live long and prosper. -- Spock, "Amok Time", stardate 3372.7 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss at python.org https://mail.python.org/mailman/listinfo/tkinter-discuss From thomas.f.hahn2 at gmail.com Sun Jan 4 05:56:54 2015 From: thomas.f.hahn2 at gmail.com (thomas hahn) Date: Sat, 3 Jan 2015 22:56:54 -0600 Subject: [Tkinter-discuss] 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 Message-ID: *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* Hi 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 <%28501%29%20301-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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.f.hahn2 at gmail.com Sun Jan 4 05:57:37 2015 From: thomas.f.hahn2 at gmail.com (thomas hahn) Date: Sat, 3 Jan 2015 22:57:37 -0600 Subject: [Tkinter-discuss] 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 Message-ID: *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* Hi 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 <%28501%29%20301-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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkieverpy at tlink.de Mon Jan 5 17:57:37 2015 From: mkieverpy at tlink.de (mkieverpy at tlink.de) Date: Mon, 05 Jan 2015 16:57:37 -0000 Subject: [Tkinter-discuss] =?utf-8?q?Event_debugger?= Message-ID: <3kGM2y4HDNz7LjM@mail.python.org> Hi Vasilis and Michael, I thought you could use xev just by starting it in another shell with "xev -id ". Or do you lose some info by running it this way? (I mean even more than by the other heavy restrictions - they seem to make xev useless for event debugging. I'll have to look at the other tools you mentioned one of these days...) Best Regards, Matthias. From klappnase at web.de Mon Jan 5 18:12:34 2015 From: klappnase at web.de (Michael Lange) Date: Mon, 5 Jan 2015 18:12:34 +0100 Subject: [Tkinter-discuss] Event debugger In-Reply-To: <3kGM2y4HDNz7LjM@mail.python.org> References: <3kGM2y4HDNz7LjM@mail.python.org> Message-ID: <20150105181234.9cee003cf59a9e0e32adc63f@web.de> Hi, On Mon, 05 Jan 2015 16:57:37 -0000 mkieverpy at tlink.de wrote: > > Hi Vasilis and Michael, > > I thought you could use xev just by starting it > in another shell with "xev -id ". > Or do you lose some info by running it this way? I think this is more or less the exact same as Popen does. > (I mean even more than by the other heavy restrictions > - they seem to make xev useless for event debugging. > I'll have to look at the other tools you mentioned > one of these days...) Unfortunately xmon and xscope seem to be outdated, at least they are not available in debian wheezy any longer. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. There's no honorable way to kill, no gentle way to destroy. There is nothing good in war. Except its ending. -- Abraham Lincoln, "The Savage Curtain", stardate 5906.5 From Vasilis.Vlachoudis at cern.ch Thu Jan 22 17:24:05 2015 From: Vasilis.Vlachoudis at cern.ch (Vasilis Vlachoudis) Date: Thu, 22 Jan 2015 16:24:05 +0000 Subject: [Tkinter-discuss] Text folding of text Message-ID: <0BC70B5D93E054469872FFD0FE07220E011AC752CA@CERNXCHG54.cern.ch> 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 Vasilis -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan.oakley at gmail.com Thu Jan 22 17:57:37 2015 From: bryan.oakley at gmail.com (Bryan Oakley) Date: Thu, 22 Jan 2015 10:57:37 -0600 Subject: [Tkinter-discuss] Text folding of text In-Reply-To: <0BC70B5D93E054469872FFD0FE07220E011AC752CA@CERNXCHG54.cern.ch> References: <0BC70B5D93E054469872FFD0FE07220E011AC752CA@CERNXCHG54.cern.ch> Message-ID: Yes, it is possible, though you have to do a lot of the work yourself. You can actually intercept the low level text insertions and deletions that happen as a result of the built-in bindings, and allow or reject the insertions based on whatever criteria you want. You can, for example, check the tags surrounding the insertion point when text is inserted. If you have a tag such as "readonly", you can prevent the insertion from happening. Here's a solution that illustrates the technique: http://stackoverflow.com/a/11180132/7432 On Thu, Jan 22, 2015 at 10:24 AM, Vasilis Vlachoudis < Vasilis.Vlachoudis at cern.ch> wrote: > 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 > Vasilis > > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robertson.patrick at gmail.com Wed Jan 28 08:20:12 2015 From: robertson.patrick at gmail.com (Patrick Robertson) Date: Wed, 28 Jan 2015 07:20:12 +0000 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X Message-ID: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> 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 You can see the full question on SO: https://stackoverflow.com/questions/28166029/tkinter-colours-lighter-on-os-x -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.odonnell at uam.es Wed Jan 28 15:03:06 2015 From: michael.odonnell at uam.es (Michael O'Donnell) Date: Wed, 28 Jan 2015 15:03:06 +0100 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> Message-ID: Hi Patrick, I noted something similar in a post to this list in May 2013: https://mail.python.org/pipermail/tkinter-discuss/2013-May/003446.html My GUI used a gif for borders, and I will with a colored canvas. On the (then) new Macosx, the colors of the gif were different from the canvas color. ...while on Windows or earlier versions of Macosx, the gif and canvas merged seamlessly. I received no response which fixed the problem. My code now has special code to substitute color codes if on a Mac running 10.9 or higher. Lots of work for some stupid reason outside my control. My guess it is Apple's fault, but may be due to problems in the Mac port of Tk. Because of problems like these, I am moving my code base to an htm5 interface, on the rational that sheer number of users will cause bugs to be ironed out quicker (I have been using tk, and then tkinter, since 1995). Mick On 28 January 2015 at 08:20, Patrick Robertson wrote: > 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 > > > > You can see the full question on SO: > https://stackoverflow.com/questions/28166029/tkinter-colours-lighter-on-os-x > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > From kw at codebykevin.com Wed Jan 28 15:08:10 2015 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 28 Jan 2015 09:08:10 -0500 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> Message-ID: <54C8ED4A.4090500@codebykevin.com> On 1/28/15 9:03 AM, Michael O'Donnell wrote: > My GUI used a gif for borders, and I will with a colored canvas. > On the (then) new Macosx, the colors of the gif were different > from the canvas color. > > ...while on Windows or earlier versions of Macosx, the gif > and canvas merged seamlessly. > > I received no response which fixed the problem. Sorry about that. IIRC It was a very obscure bug related to a change in color-rendering API in Cocoa that someone noticed and submitted a patch for; recent versions of ActiveTcl should not show the bug. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com From kw at codebykevin.com Wed Jan 28 15:09:23 2015 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 28 Jan 2015 09:09:23 -0500 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> Message-ID: <54C8ED93.3050700@codebykevin.com> On 1/28/15 2:20 AM, Patrick Robertson wrote: > 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 OS X changed its default rendering of RGB a few years ago; Tk was updated last year to reflect this change. If you are using the Tk built into OS X, you'll still see the issue. Try installing ActiveTcl and see if that helps. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com From kw at codebykevin.com Wed Jan 28 14:52:16 2015 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 28 Jan 2015 08:52:16 -0500 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> Message-ID: <54C8E990.40800@codebykevin.com> On 1/28/15 2:20 AM, Patrick Robertson wrote: > 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 OS X changed its default rendering of RGB a few years ago; Tk was updated last year to reflect this change. If you are using the Tk built into OS X, you'll still see the issue. Try installing ActiveTcl and see if that helps. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com From michael.odonnell at uam.es Wed Jan 28 16:05:35 2015 From: michael.odonnell at uam.es (Michael O'Donnell) Date: Wed, 28 Jan 2015 16:05:35 +0100 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: <54C8ED4A.4090500@codebykevin.com> References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> <54C8ED4A.4090500@codebykevin.com> Message-ID: Thanks Kevin, I will remove my fixing code and see if colours are displayed ok again. Mick On 28 January 2015 at 15:08, Kevin Walzer wrote: > On 1/28/15 9:03 AM, Michael O'Donnell wrote: >> >> My GUI used a gif for borders, and I will with a colored canvas. >> On the (then) new Macosx, the colors of the gif were different >> from the canvas color. >> >> ...while on Windows or earlier versions of Macosx, the gif >> and canvas merged seamlessly. >> >> I received no response which fixed the problem. > > Sorry about that. IIRC It was a very obscure bug related to a change in > color-rendering API in Cocoa that someone noticed and submitted a patch for; > recent versions of ActiveTcl should not show the bug. > > --Kevin > > -- > Kevin Walzer > Code by Kevin/Mobile Code by Kevin > http://www.codebykevin.com > http://www.wtmobilesoftware.com > > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss From robertson.patrick at gmail.com Wed Jan 28 19:11:30 2015 From: robertson.patrick at gmail.com (Patrick Robertson) Date: Wed, 28 Jan 2015 18:11:30 +0000 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> <54C8ED4A.4090500@codebykevin.com> Message-ID: <9312A478-547F-479B-8E6A-095FF91A30BF@gmail.com> Thanks both Kevin and Mick, Mick - it?s always nice to know I?m not the only one with the problem! Kevin - your solution worked. I initially installed ActiveTcl 8.6, which it seems isn?t compatible with Python 2/3 At the time of writing ActiveTcl 8.4/8.5 (32 bit/64 bit) are recommended for OS X For anybody with this problem in the future I recommend reading: https://www.python.org/download/mac/tcltk/ It explains which version of ActiveTcl to install for which OS/Python combination, as well as giving information on how Python links to Tkinter/tkinter: > The Python for Mac OS X installers downloaded from this website dynamically link at runtime to Tcl/Tk Mac OS X frameworks. ? There?s more on that page above PS - I?ve been using Tkinter since 2015. It?s still great ;-) On 28 Ion 2015, at 15:05, Michael O'Donnell wrote: > Thanks Kevin, > > I will remove my fixing code and see if colours > are displayed ok again. > > Mick > > On 28 January 2015 at 15:08, Kevin Walzer wrote: >> On 1/28/15 9:03 AM, Michael O'Donnell wrote: >>> >>> My GUI used a gif for borders, and I will with a colored canvas. >>> On the (then) new Macosx, the colors of the gif were different >>> from the canvas color. >>> >>> ...while on Windows or earlier versions of Macosx, the gif >>> and canvas merged seamlessly. >>> >>> I received no response which fixed the problem. >> >> Sorry about that. IIRC It was a very obscure bug related to a change in >> color-rendering API in Cocoa that someone noticed and submitted a patch for; >> recent versions of ActiveTcl should not show the bug. >> >> --Kevin >> >> -- >> Kevin Walzer >> Code by Kevin/Mobile Code by Kevin >> http://www.codebykevin.com >> http://www.wtmobilesoftware.com >> >> >> _______________________________________________ >> Tkinter-discuss mailing list >> Tkinter-discuss at python.org >> https://mail.python.org/mailman/listinfo/tkinter-discuss > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss From robertson.patrick at gmail.com Wed Jan 28 22:52:47 2015 From: robertson.patrick at gmail.com (Patrick Robertson) Date: Wed, 28 Jan 2015 21:52:47 +0000 Subject: [Tkinter-discuss] Tkinter colours lighter on OS X In-Reply-To: <9312A478-547F-479B-8E6A-095FF91A30BF@gmail.com> References: <0EE1B28B-452D-4EDC-BD8E-CF89D345E377@gmail.com> <54C8ED4A.4090500@codebykevin.com> <9312A478-547F-479B-8E6A-095FF91A30BF@gmail.com> Message-ID: <76942E90-75F6-476B-BB8C-AF8B17C5E74E@gmail.com> Just as a follow up: If you?re packaging ActiveTcl into a .app for OS X (using PyInstaller, py2app or similar) it may not work from the onset. I ended up having to comment out the ?teapot? code in /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/init.tcl to get it working The problematic lines are the last few lines that include: "require activestate::teapot::link? Now, finally, I have a right-colour OS X .app bundle :) Cheers On 28 Ion 2015, at 18:11, Patrick Robertson wrote: > Thanks both Kevin and Mick, > > Mick - it?s always nice to know I?m not the only one with the problem! > Kevin - your solution worked. > > I initially installed ActiveTcl 8.6, which it seems isn?t compatible with Python 2/3 > At the time of writing ActiveTcl 8.4/8.5 (32 bit/64 bit) are recommended for OS X > For anybody with this problem in the future I recommend reading: > https://www.python.org/download/mac/tcltk/ > > It explains which version of ActiveTcl to install for which OS/Python combination, as well as giving information on how Python links to Tkinter/tkinter: > >> The Python for Mac OS X installers downloaded from this website dynamically link at runtime to Tcl/Tk Mac OS X frameworks. ? > There?s more on that page above > > > PS - I?ve been using Tkinter since 2015. It?s still great ;-) > > > On 28 Ion 2015, at 15:05, Michael O'Donnell wrote: > >> Thanks Kevin, >> >> I will remove my fixing code and see if colours >> are displayed ok again. >> >> Mick >> >> On 28 January 2015 at 15:08, Kevin Walzer wrote: >>> On 1/28/15 9:03 AM, Michael O'Donnell wrote: >>>> >>>> My GUI used a gif for borders, and I will with a colored canvas. >>>> On the (then) new Macosx, the colors of the gif were different >>>> from the canvas color. >>>> >>>> ...while on Windows or earlier versions of Macosx, the gif >>>> and canvas merged seamlessly. >>>> >>>> I received no response which fixed the problem. >>> >>> Sorry about that. IIRC It was a very obscure bug related to a change in >>> color-rendering API in Cocoa that someone noticed and submitted a patch for; >>> recent versions of ActiveTcl should not show the bug. >>> >>> --Kevin >>> >>> -- >>> Kevin Walzer >>> Code by Kevin/Mobile Code by Kevin >>> http://www.codebykevin.com >>> http://www.wtmobilesoftware.com >>> >>> >>> _______________________________________________ >>> Tkinter-discuss mailing list >>> Tkinter-discuss at python.org >>> https://mail.python.org/mailman/listinfo/tkinter-discuss >> _______________________________________________ >> Tkinter-discuss mailing list >> Tkinter-discuss at python.org >> https://mail.python.org/mailman/listinfo/tkinter-discuss > From motus at laposte.net Sat Jan 31 09:20:06 2015 From: motus at laposte.net (=?UTF-8?B?UmFwaGHDq2wgU0VCQU4=?=) Date: Sat, 31 Jan 2015 09:20:06 +0100 Subject: [Tkinter-discuss] Weird bug in input widgets? Message-ID: <54CC9036.5060705@laposte.net> 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: [CODE] #!/usr/bin/env python3 # -*- coding: utf-8 -*- from tkinter import * def clear_all (event=None): # clear stringvars for svar in cvars: svar.set("") # 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)) cvars = list() for n in range(nb_of_widgets): svar = StringVar() cvars.append(svar) Entry(root, textvariable=svar).pack() # end for texts = list() for n in range(nb_of_widgets): wtext = Text(root, height=2, width=20) wtext.pack() texts.append(wtext) # end for Button(root, text="Clear all", command=clear_all).pack(side=LEFT) Button(root, text="Quit", command=root.destroy).pack(side=RIGHT) # events main loop root.mainloop() # end def if __name__ == "__main__": # launch test series for n in range(1, 4): test(n) # end for # end if [/CODE] Detailed description of the issue: * French keyboards are arranged in such a way that you must compose accented letters as ? (e circumflex) or ? (e diaeresis) by pressing first the '^' key and then the letter to compose with (e.g. a, e, i, o, u, y) in order to get the final composite-accented letter (?, ?, ?, ?, and so on); * when you launch the test script (cited above) and then type, let's say, the e circumflex letter (?) into the Entry widget and into the Text widget, respectively: * the first time, you'll get the right letters inserted into the input widgets; * then click on 'Clear all' button and enter once again the same composite-accented letter into *ALL* the input widgets; * secund time, only the last pack()-ed input widget will get the right input, all other widgets will show unaccented letters; * the test script tries with 1 Entry and 1 Text input widgets, then with 2 input widgets and finally with 3 input widgets; * each time you get the same issue: only the last pack()-ed input widget shows the right input letter, all the rest showing unaccented letters. This issue is quite embarrassing for me as my latest software manages with movie scenario scriptwriting, which *MUST* be written with correct accents in French, otherwise all the purpose of the software would collapse. Is this a known issue? Thank you for your expert advice. Regards. Rapha?l SEBAN alias tarball69. From klappnase at web.de Sat Jan 31 10:29:35 2015 From: klappnase at web.de (Michael Lange) Date: Sat, 31 Jan 2015 10:29:35 +0100 Subject: [Tkinter-discuss] Weird bug in input widgets? In-Reply-To: <54CC9036.5060705@laposte.net> References: <54CC9036.5060705@laposte.net> Message-ID: <20150131102935.7159e8d2bae539572639eb3d@web.de> Hi Rapha?l, I cannot reproduce this behavior here (debian wheezy, Tk-8.5.11), however I could only test it with a german keyboard layout with X-Composite key or with dead keys temporarily enabled in xfce. I don't think that should matter, though, here everything seems to work fine. I can only guess, but it sounds to me like a platform- and/or Tk-version specific issue. If you are running OS X and a recent version of Tk it might or might not have something to do with the bug described here: http://sourceforge.net/p/tktoolkit/bugs/2722/ resp. with the fix that was supplied for that bug. That is is just a shot in the dark of course. Regards Michael On Sat, 31 Jan 2015 09:20:06 +0100 Rapha?l SEBAN wrote: > 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: > > [CODE] > #!/usr/bin/env python3 > # -*- coding: utf-8 -*- > > from tkinter import * > > def clear_all (event=None): > # clear stringvars > for svar in cvars: > svar.set("") > # 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)) > cvars = list() > for n in range(nb_of_widgets): > svar = StringVar() > cvars.append(svar) > Entry(root, textvariable=svar).pack() > # end for > texts = list() > for n in range(nb_of_widgets): > wtext = Text(root, height=2, width=20) > wtext.pack() > texts.append(wtext) > # end for > Button(root, text="Clear all", command=clear_all).pack(side=LEFT) > Button(root, text="Quit", command=root.destroy).pack(side=RIGHT) > # events main loop > root.mainloop() > # end def > > if __name__ == "__main__": > # launch test series > for n in range(1, 4): > test(n) > # end for > # end if > [/CODE] > > Detailed description of the issue: > > * French keyboards are arranged in such a way that you must compose > accented letters as ? (e circumflex) or ? (e diaeresis) by pressing > first the '^' key and then the letter to compose with (e.g. a, e, i, o, > u, y) in order to get the final composite-accented letter (?, ?, ?, ?, > and so on); > > * when you launch the test script (cited above) and then type, let's > say, the e circumflex letter (?) into the Entry widget and into the > Text widget, respectively: > > * the first time, you'll get the right letters inserted into > the input widgets; > * then click on 'Clear all' button and enter once again the > same composite-accented letter into *ALL* the input widgets; > * secund time, only the last pack()-ed input widget will get > the right input, all other widgets will show unaccented letters; > > * the test script tries with 1 Entry and 1 Text input widgets, then > with 2 input widgets and finally with 3 input widgets; > > * each time you get the same issue: only the last pack()-ed input > widget shows the right input letter, all the rest showing unaccented > letters. > > This issue is quite embarrassing for me as my latest software manages > with movie scenario scriptwriting, which *MUST* be written with correct > accents in French, otherwise all the purpose of the software would > collapse. > > Is this a known issue? > > Thank you for your expert advice. > > Regards. > > Rapha?l SEBAN alias tarball69. > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Compassion -- that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. -- McCoy, "The Ultimate Computer", stardate 4731.3