From chris_roysmith at internode.on.net Wed Jan 9 23:13:12 2019 From: chris_roysmith at internode.on.net (Chris Roy-Smith) Date: Thu, 10 Jan 2019 15:13:12 +1100 Subject: [Tkinter-discuss] how do I pass variables when binding to a widget? Message-ID: Hi System: Linux, Python Version: 3.6.7 I am trying to learn how to bind to a widget, and process the contents of the bound widget here is my attempt at code: #! /usr/bin/python3 from tkinter import * import datetime def NewAge(start): print(start) futureAge = start + 5 calculated.delete(0,END) calculated.insert(0,futureAge) master=Tk() Label(master, text='present age').grid(row=0, column=0) Label(master, text='age in 5 years').grid(row=1, column=0) first=Entry(master) first.grid(row=0, column=1) calculated = Entry(master) calculated.grid(row=1, column=1) first.bind("", NewAge(first.get())) Button(master, text='exit', command=master.destroy).grid(row=3, column=0) master.mainloop() I get the following traceback: Traceback (most recent call last): File "./bind.py", line 19, in first.bind("", NewAge(first.get())) File "./bind.py", line 7, in NewAge futureAge = start + 5 TypeError: must be str, not int All hints & help greatly appreciated. regards, Chris Roy-Smith From klappnase at web.de Thu Jan 10 05:02:38 2019 From: klappnase at web.de (Michael Lange) Date: Thu, 10 Jan 2019 11:02:38 +0100 Subject: [Tkinter-discuss] how do I pass variables when binding to a widget? In-Reply-To: References: Message-ID: <20190110110238.837a3c3622b5b20b1b5e576d@web.de> Hi Chris, On Thu, 10 Jan 2019 15:13:12 +1100 Chris Roy-Smith wrote: > Hi > System: Linux, > Python Version: 3.6.7 > > I am trying to learn how to bind to a widget, and process the contents > of the bound widget (...) > I get the following traceback: > > Traceback (most recent call last): > File "./bind.py", line 19, in > first.bind("", NewAge(first.get())) > File "./bind.py", line 7, in NewAge > futureAge = start + 5 > TypeError: must be str, not int here for some reason the traceback looks slightly different: ~$ python3 test4.py Traceback (most recent call last): File "test4.py", line 24, in first.bind("", NewAge(first.get())) File "test4.py", line 19, in NewAge futureAge = start + 5 TypeError: Can't convert 'int' object to str implicitly What happens becomes a bit more obvious if you change your code a bit like this: (...) first=Entry(master) first.grid(row=0, column=1) # add a default value in the first entry first.insert('end', 25) calculated = Entry(master) calculated.grid(row=1, column=1) first.bind("", NewAge(first.get())) (...) Then the traceback here looks like: ~$ python3 test4.py 25 Traceback (most recent call last): File "test4.py", line 21, in first.bind("", NewAge(first.get())) File "test4.py", line 8, in NewAge futureAge = start + 5 TypeError: Can't convert 'int' object to str implicitly So, what happens is, that as soon as your bind() function call is processed the NewAge() function is called with first.get() as argument. Since first.get() will always return a string, trying to add an integer value will of course cause an error. To fix this you need to change the call to bind(), so that the second argument is the function NewAge itself, not a *call* to that function, as in: first.bind("", NewAge) After the binding has been applied, each time the event occurs on that widget, the NewAge function will be called by tkinter with an Event object as argument. So the definition of the NewAge function might for example look like this: def NewAge(event): try: futureAge = int(event.widget.get()) + 5 calculated.delete(0,END) calculated.insert(0,futureAge) except ValueError: event.widget.bell() If you want to learn more about Events (and tkinter in general), John Shipman's excellent tkinter reference is an invaluable source of knowledge: https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html About tkinter Events: https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/events.html And of course you are always welcome here to ask further questions. I hope this helps. Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. ... bacteriological warfare ... hard to believe we were once foolish enough to play around with that. -- McCoy, "The Omega Glory", stardate unknown From chris_roysmith at internode.on.net Thu Jan 10 15:15:16 2019 From: chris_roysmith at internode.on.net (Chris Roy-Smith) Date: Fri, 11 Jan 2019 07:15:16 +1100 Subject: [Tkinter-discuss] how do I pass variables when binding to a widget? In-Reply-To: <20190110110238.837a3c3622b5b20b1b5e576d@web.de> References: <20190110110238.837a3c3622b5b20b1b5e576d@web.de> Message-ID: On 10/1/19 9:02 pm, Michael Lange wrote: > Hi Chris, > > On Thu, 10 Jan 2019 15:13:12 +1100 > Chris Roy-Smith wrote: >> >> I am trying to learn how to bind to a widget, and process the contents >> of the bound widget > (...) > > https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html > About tkinter Events: > https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/events.html > > And of course you are always welcome here to ask further questions. > > I hope this helps. > > Michael > > > ..-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. > > .... bacteriological warfare ... hard to believe we were once foolish > enough to play around with that. > -- McCoy, "The Omega Glory", stardate unknown > Thank you Michael, Those two links look like great resources, Regards, Chris From mario.stg at videotron.ca Fri Jan 11 12:03:02 2019 From: mario.stg at videotron.ca (Mario St-Gelais) Date: Fri, 11 Jan 2019 12:03:02 -0500 Subject: [Tkinter-discuss] Scrollbar for thumbnails Message-ID: I am having a terrible time wrapping this under my head. What is missing here to have the scrollbar working. Everything is displayed fine.? But the slider of the scrollbar is full length. i.e. same height as outerframe.? which is same size as the canvas. ??? def setup(self): ??????? c = 0 ??????? r = 0 ??????? outer_frame = Frame(self, bg='red', padx=2, pady=2) ??????? outer_frame.pack() ??????? scrollbar = Scrollbar(outer_frame) ??????? scrollbar.pack( side = RIGHT, fill=Y ) ??????? canvas = Canvas(outer_frame, height=100, scrollregion=(0,0,300,300), yscrollcommand=scrollbar.set) ??????? canvas.pack(side=LEFT, expand=YES, fill=BOTH) ??????? scrollbar.config(command=canvas.yview) ??????? for f in os.listdir(self.thumbnail_folder): ??????????? fpath = os.path.join(self.thumbnail_folder, f) ??????????? photo = PhotoImage(file=fpath) ??????????? photo_frame = Frame(canvas, bg='white', padx=2, pady=2) ??????????? lbl_photo = Label(photo_frame, image=photo, text=f) lbl_photo.bind("",self.photo_click) ??????????? lbl_photo.image=photo ??????????? lbl_photo.pack() ??????????? lbl_name = Label(photo_frame, text=f.split('.')[0]) lbl_name.bind("",self.photo_click) ??????????? lbl_name.pack() ??????????? photo_frame.grid(row=r, column=c) ??????????? if c > 2: ??????????????? c = 0 ??????????????? r = r + 1 ??????????? else: ??????????????? c = c + 1 Regards Mario St-Gelais From bryan.oakley at gmail.com Fri Jan 11 16:06:22 2019 From: bryan.oakley at gmail.com (Bryan Oakley) Date: Fri, 11 Jan 2019 15:06:22 -0600 Subject: [Tkinter-discuss] Scrollbar for thumbnails In-Reply-To: References: Message-ID: The canvas can only scroll things added to the canvas with the create_* functions (create_image, create_window, create_line, etc). You cannot add widgets to the canvas with pack, place, or grid, and then be able to scroll them. On Fri, Jan 11, 2019 at 1:15 PM Mario St-Gelais wrote: > I am having a terrible time wrapping this under my head. > > What is missing here to have the scrollbar working. > > Everything is displayed fine. But the slider of the scrollbar is full > length. i.e. same height as outerframe. which is same size as the canvas. > > def setup(self): > c = 0 > r = 0 > outer_frame = Frame(self, bg='red', padx=2, pady=2) > outer_frame.pack() > scrollbar = Scrollbar(outer_frame) > scrollbar.pack( side = RIGHT, fill=Y ) > > canvas = Canvas(outer_frame, height=100, > scrollregion=(0,0,300,300), yscrollcommand=scrollbar.set) > canvas.pack(side=LEFT, expand=YES, fill=BOTH) > scrollbar.config(command=canvas.yview) > > for f in os.listdir(self.thumbnail_folder): > fpath = os.path.join(self.thumbnail_folder, f) > photo = PhotoImage(file=fpath) > photo_frame = Frame(canvas, bg='white', padx=2, pady=2) > lbl_photo = Label(photo_frame, image=photo, text=f) > lbl_photo.bind("",self.photo_click) > lbl_photo.image=photo > lbl_photo.pack() > lbl_name = Label(photo_frame, text=f.split('.')[0]) > lbl_name.bind("",self.photo_click) > lbl_name.pack() > photo_frame.grid(row=r, column=c) > if c > 2: > c = 0 > r = r + 1 > else: > c = c + 1 > > Regards > > Mario St-Gelais > > _______________________________________________ > 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 bcail at speedymail.org Sat Jan 19 20:07:07 2019 From: bcail at speedymail.org (Ben) Date: Sat, 19 Jan 2019 20:07:07 -0500 Subject: [Tkinter-discuss] ttk.Label unicode characters Message-ID: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> Hi, Is there any way to make a Label display every Unicode character, or are we just stuck until Tcl/Tk fully supports all of unicode? Here's my example code: import tkinter as tk from tkinter import ttk root = tk.Tk() ttk.Label(root, text='Test \U0001d306 String').grid(row=0, column=0) root.mainloop() And the exception: _tkinter.TclError: character U+1d306 is above the range (U+0000-U+FFFF) allowed by Tcl System: Linux, Python 3.6.7, Tk 8.6 Is there anything I can do to be able to display that character? Thanks for any pointers. -Ben From klappnase at web.de Sun Jan 20 14:06:18 2019 From: klappnase at web.de (Michael Lange) Date: Sun, 20 Jan 2019 20:06:18 +0100 Subject: [Tkinter-discuss] ttk.Label unicode characters In-Reply-To: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> References: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> Message-ID: <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> Hi, On Sat, 19 Jan 2019 20:07:07 -0500 Ben wrote: > Hi, > > Is there any way to make a Label display every Unicode character, or > are we just stuck until Tcl/Tk fully supports all of unicode? > > Here's my example code: > import tkinter as tk > from tkinter import ttk > root = tk.Tk() > ttk.Label(root, text='Test \U0001d306 String').grid(row=0, column=0) > root.mainloop() > > And the exception: > _tkinter.TclError: character U+1d306 is above the range (U+0000-U+FFFF) > allowed by Tcl > > System: Linux, Python 3.6.7, Tk 8.6 > > Is there anything I can do to be able to display that character? according to https://groups.google.com/forum/#!topic/comp.lang.tcl/OJqYYzCgKQo there is some work in progress with Tcl, otoh even if you install the latest Tcl/Tk 8.7 it might be difficult to get past this TclError which seems to be hardcoded into Tkinter (with Tcl I don't get any error here, just a placeholder where the unicode character should be). Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. On my planet, to rest is to rest -- to cease using energy. To me, it is quite illogical to run up and down on green grass, using energy, instead of saving it. -- Spock, "Shore Leave", stardate 3025.2 From klappnase at web.de Sun Jan 20 14:30:35 2019 From: klappnase at web.de (Michael Lange) Date: Sun, 20 Jan 2019 20:30:35 +0100 Subject: [Tkinter-discuss] ttk.Label unicode characters In-Reply-To: <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> References: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> Message-ID: <20190120203035.fa9e6754e1b820ee4a74bb10@web.de> Ooops, looks like I might need to correct myself. On Sun, 20 Jan 2019 20:06:18 +0100 Michael Lange wrote: (...) > according to > https://groups.google.com/forum/#!topic/comp.lang.tcl/OJqYYzCgKQo > there is some work in progress with Tcl, otoh even if you install the > latest Tcl/Tk 8.7 it might be difficult to get past this TclError which > seems to be hardcoded into Tkinter (with Tcl I don't get any error here, > just a placeholder where the unicode character should be). when I try to change your example a bit, like this: l = ttk.Label(root) l.grid() l.tk.eval(l._w + ' configure -text "Test \U0001d306 String"') there is actually some character displayed which looks similar to this one: https://www.compart.com/en/unicode/U+1D306 , which I found rather surprising since with Tcl I get only a placeholder. The same happens when I replace your unicode character with the smiley \U0001f600 they used in the page I referred to before. tk.eval appears to do some magic here. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. No more blah, blah, blah! -- Kirk, "Miri", stardate 2713.6 From klappnase at web.de Mon Jan 21 07:47:30 2019 From: klappnase at web.de (Michael Lange) Date: Mon, 21 Jan 2019 13:47:30 +0100 Subject: [Tkinter-discuss] ttk.Label unicode characters In-Reply-To: <20190120203035.fa9e6754e1b820ee4a74bb10@web.de> References: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> <20190120203035.fa9e6754e1b820ee4a74bb10@web.de> Message-ID: <20190121134730.07d593cb2f81ffb1d11538c7@web.de> Hi again, sorry for my somewhat disjointed replies :) On Sun, 20 Jan 2019 20:30:35 +0100 Michael Lange wrote: (...) > l = ttk.Label(root) > l.grid() > l.tk.eval(l._w + ' configure -text "Test \U0001d306 String"') > > there is actually some character displayed which looks similar to this > one: https://www.compart.com/en/unicode/U+1D306 , which I found rather > surprising since with Tcl I get only a placeholder. The same happens > when I replace your unicode character with the smiley \U0001f600 they > used in the page I referred to before. tk.eval appears to do some magic > here. tinkering a bit more I found another solution which seems more obvious, however I was not able to get this working with Python3. With Python2 when I do the following: from Tkinter import * import ttk root = Tk() l = ttk.Label(root) l.pack(padx=40, pady=40) s = u'Test \U0001d306 String' s1 = s.encode('utf-8') l.configure(text=s1) root.mainloop() the label's text looks like expected. Maybe that is just the same "magic" that tk.eval applies. It does not seem to be that easy with Python3 though, apparently I missed some of the subtleties with Python3's unicode handling mechanisms. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. The joys of love made her human and the agonies of love destroyed her. -- Spock, "Requiem for Methuselah", stardate 5842.8 From bcail at speedymail.org Mon Jan 21 13:00:52 2019 From: bcail at speedymail.org (Ben) Date: Mon, 21 Jan 2019 13:00:52 -0500 Subject: [Tkinter-discuss] ttk.Label unicode characters In-Reply-To: <20190121134730.07d593cb2f81ffb1d11538c7@web.de> References: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> <20190120203035.fa9e6754e1b820ee4a74bb10@web.de> <20190121134730.07d593cb2f81ffb1d11538c7@web.de> Message-ID: <1548093652.2594800.1640146024.2E323101@webmail.messagingengine.com> On Mon, Jan 21, 2019, at 7:47 AM, Michael Lange wrote: > Hi again, > > sorry for my somewhat disjointed replies :) > > On Sun, 20 Jan 2019 20:30:35 +0100 > Michael Lange wrote: > > (...) > > l = ttk.Label(root) > > l.grid() > > l.tk.eval(l._w + ' configure -text "Test \U0001d306 String"') > > > > there is actually some character displayed which looks similar to this > > one: https://www.compart.com/en/unicode/U+1D306 , which I found rather > > surprising since with Tcl I get only a placeholder. The same happens > > when I replace your unicode character with the smiley \U0001f600 they > > used in the page I referred to before. tk.eval appears to do some magic > > here. > > tinkering a bit more I found another solution which seems more obvious, > however I was not able to get this working with Python3. With Python2 > when I do the following: > > from Tkinter import * > import ttk > > root = Tk() > l = ttk.Label(root) > l.pack(padx=40, pady=40) > > s = u'Test \U0001d306 String' > s1 = s.encode('utf-8') > l.configure(text=s1) > > root.mainloop() > > the label's text looks like expected. Maybe that is just the same "magic" > that tk.eval applies. It does not seem to be that easy with Python3 > though, apparently I missed some of the subtleties with Python3's unicode > handling mechanisms. Thanks so much for your replies! Here's my little test script, with trying what you wrote, and the results I got (all on python 3): import tkinter as tk from tkinter import ttk root = tk.Tk() l = ttk.Label(root) l.grid(row=0, column=0) text = 'Test \U0001d306 String' #l.configure(text=text) # Result: _tkinter.TclError: character U+1d306 is above the range (U+0000-U+FFFF) allowed by Tcl #l.configure(text=text.encode('utf8')) # Result: no exception, but wrong characters show up l.tk.eval(l._w + f' configure -text "{text}"') # Result: works! root.mainloop() So, tkinter maintainers, would there be a way to build this into tkinter, so it transparently handles all unicode characters? If so, would there be interest in patches for it? -Ben From klappnase at web.de Mon Jan 21 17:56:37 2019 From: klappnase at web.de (Michael Lange) Date: Mon, 21 Jan 2019 23:56:37 +0100 Subject: [Tkinter-discuss] ttk.Label unicode characters In-Reply-To: <1548093652.2594800.1640146024.2E323101@webmail.messagingengine.com> References: <1547946427.2245170.1638989256.2B81E47E@webmail.messagingengine.com> <20190120200618.bbaf1aa6d59a8229d1bb02f3@web.de> <20190120203035.fa9e6754e1b820ee4a74bb10@web.de> <20190121134730.07d593cb2f81ffb1d11538c7@web.de> <1548093652.2594800.1640146024.2E323101@webmail.messagingengine.com> Message-ID: <20190121235637.80e8d9301cbcac22e64e4993@web.de> Hi, On Mon, 21 Jan 2019 13:00:52 -0500 Ben wrote: (...) > Thanks so much for your replies! > > Here's my little test script, with trying what you wrote, and the > results I got (all on python 3): import tkinter as tk > from tkinter import ttk > root = tk.Tk() > l = ttk.Label(root) > l.grid(row=0, column=0) > text = 'Test \U0001d306 String' > > #l.configure(text=text) > # Result: _tkinter.TclError: character U+1d306 is above the range (U > # +0000-U+FFFF) allowed by Tcl > > #l.configure(text=text.encode('utf8')) > # Result: no exception, but wrong characters show up > > l.tk.eval(l._w + f' configure -text "{text}"') > # Result: works! the same here. > So, tkinter maintainers, would there be a way to build this into > tkinter, so it transparently handles all unicode characters? I tried to investigate a bit further and found this thread which seems to more or less address this issue: https://bugs.python.org/issue13153 It looks like the Tkinter maintainers are waiting for Tk 9.0 to come to life which is supposed to introduce full unicode support. There seem also to be some issues with different systems not behaving exactly alike. I also found a thread where a couple of workarounds are suggested: https://stackoverflow.com/questions/40222971/python-find-equivalent-surrogate-pair-from-non-bmp-unicode-char however none of these seem to work here ? > If so, > would there be interest in patches for it? Of course you can try. Personally I would not bother (even if I had the skills to provide a patch :) Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Lots of people drink from the wrong bottle sometimes. -- Edith Keeler, "The City on the Edge of Forever", stardate unknown From bob at greschke.com Wed Jan 23 16:02:44 2019 From: bob at greschke.com (bob) Date: Wed, 23 Jan 2019 14:02:44 -0700 Subject: [Tkinter-discuss] Anaconda Message-ID: I have Anaconda 3 with Python 2 and 3 environments on a MacBook running High Sierra. One section of a program creates rectangles on a canvas (plotting GPS data points). Binding to a rectangle works fine (displays info about the point when clicked), but binding to doesn't work (it should "zap" the point out of the list and redraw the plot). The function for zapping never gets called, and there's no errors in the Terminal/xterm. It doesn't work with the Python 2 or 3 environment. Tcl/Tk versions are 8.6/8.6 in both environments. Shift-clicking, control-clicking, shift-control-clicking on the canvas or created items seems fine. Just this deal doesn't. The same code runs fine in an Anaconda Python 3 environment in CentOS (using VMWare). A Python package we make for our programs on the Mac (and one for Linux) with Python 2.7.9 Tcl/Tk 8.6/8.6 which starts XQuartz on a Mac when we start a Tkinter program is fine (it's what some are trying to replace with this whole Anaconda stuff). Python 3 on Win10 works fine. There is some old chatter about anaconda/conda Tkinter not being great on Macs on the net, but I've never seen a solution to get Anaconda to use a different Tcl/Tk library. The Anaconda Tkinter looks like junk. Apple's Tcl/Tk/Tkinter has never worked/looked well. Anyone seen this business? Any ideas? Thanks! Bob From bob at greschke.com Wed Jan 23 16:32:49 2019 From: bob at greschke.com (bob) Date: Wed, 23 Jan 2019 14:32:49 -0700 Subject: [Tkinter-discuss] Anaconda In-Reply-To: References: Message-ID: <5F5B9E53-1080-4573-BE9C-504AE2A4D3A6@greschke.com> This is handy. Instead of stock/default/unfiddled-with Anaconda Tkinter is calling it . My Tkinter programs have been around since 2004. I've never had to watch for . It must be in some configuration file somewhere, but I'll just watch for it. Don't want the user to have to mess around and change things. Never mind. :) > On 2019-01-23, at 14:02, bob wrote: > > I have Anaconda 3 with Python 2 and 3 environments on a MacBook running High Sierra. > One section of a program creates rectangles on a canvas (plotting GPS data points). Binding to a rectangle works fine (displays info about the point when clicked), but binding to doesn't work (it should "zap" the point out of the list and redraw the plot). The function for zapping never gets called, and there's no errors in the Terminal/xterm. It doesn't work with the Python 2 or 3 environment. Tcl/Tk versions are 8.6/8.6 in both environments. Shift-clicking, control-clicking, shift-control-clicking on the canvas or created items seems fine. Just this deal doesn't. > > The same code runs fine in an Anaconda Python 3 environment in CentOS (using VMWare). > A Python package we make for our programs on the Mac (and one for Linux) with Python 2.7.9 Tcl/Tk 8.6/8.6 which starts XQuartz on a Mac when we start a Tkinter program is fine (it's what some are trying to replace with this whole Anaconda stuff). > Python 3 on Win10 works fine. > > There is some old chatter about anaconda/conda Tkinter not being great on Macs on the net, but I've never seen a solution to get Anaconda to use a different Tcl/Tk library. The Anaconda Tkinter looks like junk. Apple's Tcl/Tk/Tkinter has never worked/looked well. > > Anyone seen this business? Any ideas? Thanks! > > Bob > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > From tjmac at tolisgroup.com Wed Jan 23 17:18:26 2019 From: tjmac at tolisgroup.com (Tim Jones) Date: Wed, 23 Jan 2019 15:18:26 -0700 Subject: [Tkinter-discuss] Anaconda In-Reply-To: <5F5B9E53-1080-4573-BE9C-504AE2A4D3A6@greschke.com> References: <5F5B9E53-1080-4573-BE9C-504AE2A4D3A6@greschke.com> Message-ID: Hi, we're Apple. We know that your existing code is working fine, but we're going to change things up for no good reason. Wanna buy a new underpowered Mac? Unfortunately, it doesn't only apply to Tkinter and Python. -- Tim > On Jan 23, 2019, at 2:32 PM, bob wrote: > > This is handy. Instead of stock/default/unfiddled-with Anaconda Tkinter is calling it . My Tkinter programs have been around since 2004. I've never had to watch for . It must be in some configuration file somewhere, but I'll just watch for it. Don't want the user to have to mess around and change things. > > Never mind. :) > >> On 2019-01-23, at 14:02, bob wrote: >> >> I have Anaconda 3 with Python 2 and 3 environments on a MacBook running High Sierra. >> One section of a program creates rectangles on a canvas (plotting GPS data points). Binding to a rectangle works fine (displays info about the point when clicked), but binding to doesn't work (it should "zap" the point out of the list and redraw the plot). The function for zapping never gets called, and there's no errors in the Terminal/xterm. It doesn't work with the Python 2 or 3 environment. Tcl/Tk versions are 8.6/8.6 in both environments. Shift-clicking, control-clicking, shift-control-clicking on the canvas or created items seems fine. Just this deal doesn't. >> >> The same code runs fine in an Anaconda Python 3 environment in CentOS (using VMWare). >> A Python package we make for our programs on the Mac (and one for Linux) with Python 2.7.9 Tcl/Tk 8.6/8.6 which starts XQuartz on a Mac when we start a Tkinter program is fine (it's what some are trying to replace with this whole Anaconda stuff). >> Python 3 on Win10 works fine. >> >> There is some old chatter about anaconda/conda Tkinter not being great on Macs on the net, but I've never seen a solution to get Anaconda to use a different Tcl/Tk library. The Anaconda Tkinter looks like junk. Apple's Tcl/Tk/Tkinter has never worked/looked well. >> >> Anyone seen this business? Any ideas? Thanks! >> >> Bob >> >> _______________________________________________ >> 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 bob at greschke.com Wed Jan 23 18:07:09 2019 From: bob at greschke.com (bob) Date: Wed, 23 Jan 2019 16:07:09 -0700 Subject: [Tkinter-discuss] Anaconda In-Reply-To: References: <5F5B9E53-1080-4573-BE9C-504AE2A4D3A6@greschke.com> Message-ID: Haha! I have two late-2012 mini's, two mid-2012 MacBooks, a mid-2010 27" iMac, and two not new iPads that I can't type fast enough on to keep up with. Oh, and a Raspberry Pi in the mail. :) I think this is an Anaconda thing. Other Tkinters on macOS seem to work fine, except, like I said, Apple's version (the one that comes with the OS). It has never been good. It looks like half-drowned Aqua, some Radiobutton groups don't behave, and it used to throw a fit over simple exit() commands. Oh well, it's just a bunch of if-statements to fix it. It keeps you on your toes. :) > On 2019-01-23, at 15:18, Tim Jones wrote: > > Hi, we're Apple. We know that your existing code is working fine, but we're going to change things up for no good reason. Wanna buy a new underpowered Mac? > > Unfortunately, it doesn't only apply to Tkinter and Python. > > -- > Tim > > >> On Jan 23, 2019, at 2:32 PM, bob wrote: >> >> This is handy. Instead of stock/default/unfiddled-with Anaconda Tkinter is calling it . My Tkinter programs have been around since 2004. I've never had to watch for . It must be in some configuration file somewhere, but I'll just watch for it. Don't want the user to have to mess around and change things. >> >> Never mind. :) >> >>> On 2019-01-23, at 14:02, bob wrote: >>> >>> I have Anaconda 3 with Python 2 and 3 environments on a MacBook running High Sierra. >>> One section of a program creates rectangles on a canvas (plotting GPS data points). Binding to a rectangle works fine (displays info about the point when clicked), but binding to doesn't work (it should "zap" the point out of the list and redraw the plot). The function for zapping never gets called, and there's no errors in the Terminal/xterm. It doesn't work with the Python 2 or 3 environment. Tcl/Tk versions are 8.6/8.6 in both environments. Shift-clicking, control-clicking, shift-control-clicking on the canvas or created items seems fine. Just this deal doesn't. >>> >>> The same code runs fine in an Anaconda Python 3 environment in CentOS (using VMWare). >>> A Python package we make for our programs on the Mac (and one for Linux) with Python 2.7.9 Tcl/Tk 8.6/8.6 which starts XQuartz on a Mac when we start a Tkinter program is fine (it's what some are trying to replace with this whole Anaconda stuff). >>> Python 3 on Win10 works fine. >>> >>> There is some old chatter about anaconda/conda Tkinter not being great on Macs on the net, but I've never seen a solution to get Anaconda to use a different Tcl/Tk library. The Anaconda Tkinter looks like junk. Apple's Tcl/Tk/Tkinter has never worked/looked well. >>> >>> Anyone seen this business? Any ideas? Thanks! >>> >>> Bob >>> >>> _______________________________________________ >>> 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 >