From lac at openend.se Sun Nov 1 02:30:58 2015 From: lac at openend.se (Laura Creighton) Date: Sun, 01 Nov 2015 08:30:58 +0100 Subject: [Tkinter-discuss] Linux compile Python with (Active)Tcl 8.6 In-Reply-To: References: Message-ID: <201511010730.tA17UwI1023948@fido.openend.se> In a message of Sat, 31 Oct 2015 11:52:04 +0200, Aivar Annamaa writes: >I'm trying to compile Python 3.5.0 on CentOS 6 with Tcl 8.6. I did > >./configure --with-tcltk-includes=I/opt/ActiveTcl-8.6/include >--with-tcltk-libs=L/opt/ActiveTcl-8.6/libs --prefix=/home/aivar/localpython >After installing, IDLE -> Help -> About shows me that I'm using Tk 8.5.7. > >What could have gone wrong? One possibility is that the idle you are getting isn't the one that you just made, but a different one on your system, possibly connected to 2.7 Laura From bob at passcal.nmt.edu Mon Nov 16 13:50:44 2015 From: bob at passcal.nmt.edu (Robert Greschke) Date: Mon, 16 Nov 2015 11:50:44 -0700 Subject: [Tkinter-discuss] JPEGs Message-ID: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> Why can't I go Pic = PhotoImage(file = "./lp.jpg") ? Are JPEGs not popular enough yet, or am I missing something? This is one of the craziest restrictions to Tkinter I can think of. I wish I knew how to fix it, but I just ain't smart enough. No, I don't want to use PIL. I'd like to make imbedded help that is just simple text-picture-text-picture, instead of just text. Yes, the pictures could be PNGs, but, again, are JPEGs just not popular enough, or is it a licensing thing of some sort? Bob From klappnase at web.de Mon Nov 16 14:14:08 2015 From: klappnase at web.de (Michael Lange) Date: Mon, 16 Nov 2015 20:14:08 +0100 Subject: [Tkinter-discuss] JPEGs In-Reply-To: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> References: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> Message-ID: <20151116201408.ebd4279b23052a14a1307db7@web.de> Hi, On Mon, 16 Nov 2015 11:50:44 -0700 Robert Greschke wrote: > Why can't I go > > Pic = PhotoImage(file = "./lp.jpg") > > ? > > Are JPEGs not popular enough yet, or am I missing something? This is > one of the craziest restrictions to Tkinter I can think of. I wish I > knew how to fix it, but I just ain't smart enough. > > No, I don't want to use PIL. I'd like to make imbedded help that is > just simple text-picture-text-picture, instead of just text. Yes, the > pictures could be PNGs, but, again, are JPEGs just not popular enough, > or is it a licensing thing of some sort? reading https://en.wikipedia.org/wiki/JPEG#Patent_issues I figure that it might be the latter. If you don't want to use PIL, maybe tkimg is an option for you? If not I am afraid you will have to stick with PNGs or GIFs. Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. "The combination of a number of things to make existence worthwhile." "Yes, the philosophy of 'none,' meaning 'all.'" -- Spock and Lincoln, "The Savage Curtain", stardate 5906.4 From bob at passcal.nmt.edu Mon Nov 16 17:18:37 2015 From: bob at passcal.nmt.edu (Robert Greschke) Date: Mon, 16 Nov 2015 15:18:37 -0700 Subject: [Tkinter-discuss] JPEGs In-Reply-To: <2DEC028C-DDB0-4B4B-A281-7B835FF4CC67@passcal.nmt.edu> References: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> <20151116201408.ebd4279b23052a14a1307db7@web.de> <2DEC028C-DDB0-4B4B-A281-7B835FF4CC67@passcal.nmt.edu> Message-ID: <5B66C52E-9387-4A9E-90A2-414B2B5B2BAE@passcal.nmt.edu> Oops. Didn't hit the Reply All. > On 2015-11-16, at 12:39, Robert Greschke wrote: > > >> On 2015-11-16, at 12:14, Michael Lange wrote: >> >> Hi, >> >> On Mon, 16 Nov 2015 11:50:44 -0700 >> Robert Greschke wrote: >> >>> Why can't I go >>> >>> Pic = PhotoImage(file = "./lp.jpg") >>> >>> ? >>> >>> Are JPEGs not popular enough yet, or am I missing something? This is >>> one of the craziest restrictions to Tkinter I can think of. I wish I >>> knew how to fix it, but I just ain't smart enough. >>> >>> No, I don't want to use PIL. I'd like to make imbedded help that is >>> just simple text-picture-text-picture, instead of just text. Yes, the >>> pictures could be PNGs, but, again, are JPEGs just not popular enough, >>> or is it a licensing thing of some sort? >> >> reading https://en.wikipedia.org/wiki/JPEG#Patent_issues I figure that >> it might be the latter. >> If you don't want to use PIL, maybe tkimg is an option for you? If not I >> am afraid you will have to stick with PNGs or GIFs. >> >> Best regards >> >> Michael >> > > Yup, looks like it. (Cool article.) I guess Dick the Butcher had the right idea. :) > > I can do PNGs for the help pictures, but I guess I'll just have to suck it up and use PIL for my extracurricular project -- extracting artwork from music and video files and making thumbnails. Darn it. > > How come PIL can get away with it? > > Thanks! > Bob > > From bob at passcal.nmt.edu Mon Nov 16 18:06:20 2015 From: bob at passcal.nmt.edu (Robert Greschke) Date: Mon, 16 Nov 2015 16:06:20 -0700 Subject: [Tkinter-discuss] JPEGs In-Reply-To: References: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> <20151116201408.ebd4279b23052a14a1307db7@web.de> <2DEC028C-DDB0-4B4B-A281-7B835FF4CC67@passcal.nmt.edu> <5B66C52E-9387-4A9E-90A2-414B2B5B2BAE@passcal.nmt.edu> Message-ID: > On 2015-11-16, at 16:02, Wayne Werner wrote: > > On Mon, 16 Nov 2015, Robert Greschke wrote: > >> Oops. Didn't hit the Reply All. >>> >>> I can do PNGs for the help pictures, but I guess I'll just have to suck it up and use PIL for my extracurricular project > > You probably have noticed this, but just in case - PIL is now pillow. > > -W > Good thing I didn't go looking yet. I HAD forgotten that. I'm sure Alphagoogle didn't though. :) Thanks! From wayne at waynewerner.com Mon Nov 16 18:02:39 2015 From: wayne at waynewerner.com (Wayne Werner) Date: Mon, 16 Nov 2015 23:02:39 +0000 (UTC) Subject: [Tkinter-discuss] JPEGs In-Reply-To: <5B66C52E-9387-4A9E-90A2-414B2B5B2BAE@passcal.nmt.edu> References: <2E2669DF-525F-4C68-BA35-8CB658686EF2@passcal.nmt.edu> <20151116201408.ebd4279b23052a14a1307db7@web.de> <2DEC028C-DDB0-4B4B-A281-7B835FF4CC67@passcal.nmt.edu> <5B66C52E-9387-4A9E-90A2-414B2B5B2BAE@passcal.nmt.edu> Message-ID: On Mon, 16 Nov 2015, Robert Greschke wrote: > Oops. Didn't hit the Reply All. >> >> I can do PNGs for the help pictures, but I guess I'll just have to suck it up and use PIL for my extracurricular project You probably have noticed this, but just in case - PIL is now pillow. -W From uvizhe at yandex.ru Sat Nov 28 16:28:29 2015 From: uvizhe at yandex.ru (Alexander Uvizhev) Date: Sun, 29 Nov 2015 00:28:29 +0300 Subject: [Tkinter-discuss] Tkinter on OS X generates excessive event on non-US input sequence Message-ID: <955501448746109@web24m.yandex.ru> Hi, I've found that Tkinter on Mac OS X somehow incorrectly works with events when bound sequence hit on non-US keyboard layout. I use Russian keyboard layout along with English and I'm trying now to arrange Undo/Redo shortcuts to work correctly independent of layout. Under Linux everything works fine from the box. Under OS X it seems like a bug and when I hit which is the same physical keys as tkinter sends excessive KeyPress event. Here is the test code. ================ from tkinter import * class TkExample(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.pack() text = Text(self) text.pack() text.bind('', self.on_kp) text.bind('<>', self.on_undo) def on_kp(self, event): print('CHAR:', event.char) def on_undo(self, event): print('UNDO') if __name__ == '__main__': root = Tk() TkExample(root) root.mainloop() ================ When I run the app and hit I get this output: CHAR: UNDO But if I hit I see this: CHAR: CHAR: z UNDO Under Linux in both cases I get the same output (1). Can anyone explain this? Maybe this is not a bug? -- Alexander Uvizhev uvizhe at yandex.ru From lac at openend.se Sat Nov 28 16:43:25 2015 From: lac at openend.se (Laura Creighton) Date: Sat, 28 Nov 2015 22:43:25 +0100 Subject: [Tkinter-discuss] Tkinter on OS X generates excessive event on non-US input sequence In-Reply-To: <955501448746109@web24m.yandex.ru> References: <955501448746109@web24m.yandex.ru> Message-ID: <201511282143.tASLhPju025286@fido.openend.se> In a message of Sun, 29 Nov 2015 00:28:29 +0300, Alexander Uvizhev writes: >Hi, >I've found that Tkinter on Mac OS X somehow incorrectly works with events when bound sequence hit on non-US keyboard layout. >I use Russian keyboard layout along with English and I'm trying now to arrange Undo/Redo shortcuts to work correctly independent of layout. Under Linux everything works fine from the box. Under OS X it seems like a bug and when I hit which is the same physical keys as tkinter sends excessive KeyPress event. >Here is the test code. >================ >from tkinter import * > >class TkExample(Frame): > def __init__(self, parent): > Frame.__init__(self, parent) > self.pack() > text = Text(self) > text.pack() > text.bind('', self.on_kp) > text.bind('<>', self.on_undo) > > def on_kp(self, event): > print('CHAR:', event.char) > > def on_undo(self, event): > print('UNDO') > > >if __name__ == '__main__': > root = Tk() > TkExample(root) > root.mainloop() >================ > >When I run the app and hit I get this output: >CHAR: >UNDO > >But if I hit I see this: >CHAR: >CHAR: z >UNDO > >Under Linux in both cases I get the same output (1). > >Can anyone explain this? Maybe this is not a bug? > >-- >Alexander Uvizhev >uvizhe at yandex.ru >_______________________________________________ >Tkinter-discuss mailing list >Tkinter-discuss at python.org >https://mail.python.org/mailman/listinfo/tkinter-discuss Conceivably related to this: https://bugs.python.org/issue10973 which is filed under 'Tk bug'. Maybe Tk got fixed but not quite enough fixed? Laura