Re: Tkinter on Mac OS crashes python

2019-05-14 Thread Terry Reedy
On 5/14/2019 9:27 PM, Wildman via Python-list wrote: On Tue, 14 May 2019 11:22:54 -0600, Chip Towner wrote: I am trying to use tkinter and when I attempt to do so Python crashes. I am accessing Python (v 3.6.8) in Spyder (v3.6) from Anaconda. The version of TkVersion tells me the version

Re: Tkinter on Mac OS crashes python

2019-05-14 Thread Chris Angelico
On Wed, May 15, 2019 at 11:13 AM Chip Towner wrote: > > I am trying to use tkinter and when I attempt to do so Python crashes. I am > accessing Python (v 3.6.8) in Spyder (v3.6) from Anaconda. The version of > TkVersion tells me the version is 8.6 and the Anaconda environment brow

Re: Tkinter on Mac OS crashes python

2019-05-14 Thread Wildman via Python-list
On Tue, 14 May 2019 11:22:54 -0600, Chip Towner wrote: > I am trying to use tkinter and when I attempt to do so Python crashes. I am > accessing Python (v 3.6.8) in Spyder (v3.6) from Anaconda. The version of > TkVersion tells me the version is 8.6 and the Anaconda environmen

Tkinter on Mac OS crashes python

2019-05-14 Thread Chip Towner
I am trying to use tkinter and when I attempt to do so Python crashes. I am accessing Python (v 3.6.8) in Spyder (v3.6) from Anaconda. The version of TkVersion tells me the version is 8.6 and the Anaconda environment browser tells me it is 8.6.8. An example piece of code I am trying to run

Re: Tkinter performance issues between Windows and Linux

2019-04-13 Thread Peter Otten
Robert Okadar wrote: > Hi community, > > I have developed a tkinter GUI component, Python v3.7. It runs very well > in Linux but seeing a huge performance impact in Windows 10. While in > Linux an almost real-time performance is achieved, in Windows it is slow > to an unusab

Tkinter performance issues between Windows and Linux

2019-04-12 Thread Robert Okadar
Hi community, I have developed a tkinter GUI component, Python v3.7. It runs very well in Linux but seeing a huge performance impact in Windows 10. While in Linux an almost real-time performance is achieved, in Windows it is slow to an unusable level. The code is somewhat stripped down from the

Create GUI with Python using Tkinter | Youtube Playlist

2019-03-27 Thread Attreya Bhatt
In this series of 30 videos we learn how to create a Music Player from scratch using Python. Youtube Playlist - https://www.youtube.com/playlist?list=PLhTjy8cBISEp6lNKUO3iwbB1DKAkRwutl -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter

2019-03-20 Thread Informatico de Neurodesarrollo
ully finished my first project about tkinter (and I hope, not the last). Here is the finally code: #!/usr/bin/env python # #  DetectConn_2_0.py # # from tkinter import * import time, socket def isInternet():           testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM)          # Force a

Re: tkinter

2019-03-19 Thread MRAB
On 2019-03-19 19:46, Informatico de Neurodesarrollo wrote: Thanks for all yours recommendations, finally I was successfully finished my first project about tkinter (and I hope, not the last). Here is the finally code: #!/usr/bin/env python # #  DetectConn_2_0.py # # from tkinter import

Re: tkinter

2019-03-19 Thread Informatico de Neurodesarrollo
Thanks for all yours recommendations, finally I was successfully finished my first project about tkinter (and I hope, not the last). Here is the finally code: #!/usr/bin/env python # #  DetectConn_2_0.py # # from tkinter import * import time, socket def isInternet():         testConn

Re: tkinter

2019-03-19 Thread Peter Otten
hange the background color when are not >> available. I try this , but not work properly: >> >> #!/usr/bin/env python3 >> # -*- coding: utf-8 -*- > > Not needed for py 3 where utf-8 is default > >> from tkinter import * >> import soc

Re: tkinter

2019-03-18 Thread Terry Reedy
work properly:  #!/usr/bin/env python3 # -*- coding: utf-8 -*- Not needed for py 3 where utf-8 is default from tkinter import * import socket, time def DetectarConexion():     testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM)     try:         testConn.connect(('8.8.8.8

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
(every 5 seg) the connection  to internet and change the background color when are not available. I try this , but not work properly:    #!/usr/bin/env python3 # -*- coding: utf-8 -*- # from tkinter import * import socket, time def DetectarConexion():       testConn = socket.socket(socket.AF_INET

Re: tkinter

2019-03-18 Thread MRAB
properly:  #!/usr/bin/env python3 # -*- coding: utf-8 -*- # from tkinter import * import socket, time def DetectarConexion():     testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM)     try:         testConn.connect(('8.8.8.8', 80))         testConn.close()         r

Re: tkinter

2019-03-18 Thread Chris Angelico
print("No hay conexión") > > time.sleep(5) > > > What's next?, I am all eyes > Great! Now that that's working, you can go grab your Tkinter code back. But you'll have to rework things. Set your networking code aside, and just make something that,

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
ossibly can. I want make a simple program that test continuously (every 5 seg) the connection to internet and change the background color when are not available. I try this , but not work properly: #!/usr/bin/env python3 # -*- coding: utf-8 -*- # from tkinter import * import socket, time def

Re: tkinter

2019-03-18 Thread Paul Sutton
ble. I try this , but not work properly: > >  #!/usr/bin/env python3 > # -*- coding: utf-8 -*- > # > from tkinter import * > import socket, time > > def DetectarConexion(): >     testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM) >     try: >         test

Re: tkinter

2019-03-18 Thread Chris Angelico
very 5 seg) the > connection to internet and change the background color when are not > available. I try this , but not work properly: > > #!/usr/bin/env python3 > # -*- coding: utf-8 -*- > # > from tkinter import * > import socket, time > > def DetectarConexion(): &

tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
-*- # from tkinter import * import socket, time def DetectarConexion():     testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM)     try:         testConn.connect(('8.8.8.8', 80))         testConn.close()         return True     except:         testConn.close()         return False

Re: how to embed non-tkinter VLC player into grid of tkinter with python?

2019-03-16 Thread akashsahu410
how to add video within tkinter frame.I am trying to add multiple videos inside the frame. -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: get ttk.combobox choices from another class [RESOLVED]

2019-03-03 Thread Chris Angelico
On Mon, Mar 4, 2019 at 9:34 AM Rich Shepard wrote: > > On Mon, 4 Mar 2019, Chris Angelico wrote: > > > Specifically, from my reading of your example, you need a list of > > strings for the applicable values. > > Chris, > > Yep. And I was not sure just how I would get these unitl I read your > answ

Re: tkinter: get ttk.combobox choices from another class [RESOLVED]

2019-03-03 Thread Rich Shepard
On Mon, 4 Mar 2019, Chris Angelico wrote: Specifically, from my reading of your example, you need a list of strings for the applicable values. Chris, Yep. And I was not sure just how I would get these unitl I read your answer. So you need to get a list of strings from SQLAlchemy. It's been

Re: tkinter: get ttk.combobox choices from another class

2019-03-03 Thread Chris Angelico
On Mon, Mar 4, 2019 at 8:46 AM Rich Shepard wrote: > In the views module in his book the one form has a ttk.Combobox and lists > the available values in an input_args dictionary. To allow addition of new > choices for this column in my application they are in a separate class. Specifically, from

tkinter: get ttk.combobox choices from another class

2019-03-03 Thread Rich Shepard
I'm using Alan D. Moore's tkinter book as a template for my application. In the views module in his book the one form has a ttk.Combobox and lists the available values in an input_args dictionary. To allow addition of new choices for this column in my application they are in a sepa

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
On Sun, 24 Feb 2019, Wildman via Python-list wrote: The height and width can be specified in the command that creates the wedget. Wildman, I thought so, but these were not mentioned in Alan Moore's book which is my reference for learning tkinter. Thus, my second question: What

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
On Sun, 24 Feb 2019, Paul Sutton wrote: Not sure if this is helpful. I wrote a small application in python-tk, and you can indeed do this ... Paul, Thank you. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Wildman via Python-list
ed in the command that creates the wedget. > What's a good resource (other than this mail list) for such questions? http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html > TIA, > > Rich -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://m

Re: tkinter: variable width widgets in a grid?

2019-02-24 Thread Paul Sutton
On 24/02/2019 17:09, Rich Shepard wrote: > When placing widgets (e.g., Entry, Spinbox) in a grid layout can a length > (visible width) be specified? For example, a telephone extension is a > shorter > string than the number itself. > > What's a good resource (other than this mail list) for such qu

tkinter: variable width widgets in a grid?

2019-02-24 Thread Rich Shepard
When placing widgets (e.g., Entry, Spinbox) in a grid layout can a length (visible width) be specified? For example, a telephone extension is a shorter string than the number itself. What's a good resource (other than this mail list) for such questions? TIA, Rich -- https://mail.python.org/mail

Re: TKinter Newbie question

2019-01-18 Thread TUA
Thanks for your fresh pair of eyes! -- https://mail.python.org/mailman/listinfo/python-list

Re: TKinter Newbie question

2019-01-17 Thread Peter Otten
TUA wrote: > Why does the button frame in the code below not show? > tk.Button(bf, padx = 10, relief = tk.GROOVE, text = 'Help') You forgot to layout it with .pack(). > I intend to have it displayed in between the notebook at the top and the > fake statusbar at the bottom. I think for

TKinter Newbie question

2019-01-17 Thread TUA
Why does the button frame in the code below not show? I intend to have it displayed in between the notebook at the top and the fake statusbar at the bottom. Thanks for any help! from tkinter import ttk import tkinter as tk class MainForm(): def __init__(self, master

Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
Il 17/01/19 14:08, Peter Otten ha scritto: Alternatives: - If you know that you'll always just call pack() you can change the make_entry() method accordingly def make_entry(...): ... entry.pack() return entry - Write a helper function def pack(widget): widget.pack()

Re: [tkinter] question about correct use of validation

2019-01-17 Thread Peter Otten
steve wrote: > Il 17/01/19 14:08, Peter Otten ha scritto: > >> Two remarks: >> >>> self.id1_entry = self.make_entry(self.parent, maxlen=1).pack() >> >> You set all idX_entry attributes to None, as that's what pack() returns. > > you mean.. > > self.idx_entry = self.make_entry(self.p

Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
Il 17/01/19 14:08, Peter Otten ha scritto: Two remarks: self.id1_entry = self.make_entry(self.parent, maxlen=1).pack() You set all idX_entry attributes to None, as that's what pack() returns. you mean.. self.idx_entry = self.make_entry(self.parent, width=50, maxlen=30, highligh

Re: [tkinter] question about correct use of validation

2019-01-17 Thread Peter Otten
steve wrote: > Il 16/01/19 08:51, Peter Otten ha scritto: > >> def make_ui(self): >> ''' create user interface ''' >> >> def vcmd(maxlength): >> return self.parent.register( >> partial(self.maxlength_validate, maxlength=maxlength) >>

Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
"%P" ... ok following your advice and that of Rick in the previous post, I developed 2 solutions, one without classes and one with classes. I write to you if you need someone: 1) solution with class (taking a cue from here: http://effbot.org/zone/tkinter-entry-validate.htm - I

Re: [tkinter] question about correct use of validation

2019-01-16 Thread Peter Otten
dation in this way. > > - > > problem: limit number of characters in different entries of a form. > > code: > > #!/usr/bin/python > # -*- coding: utf-8 -* > > from Tkinter import * > > > class View(): > > def __init__(self, parent): >

Re: [tkinter] question about correct use of validation

2019-01-15 Thread steve
On 15/01/2019 14:16, Rick Johnson wrote: steve wrote: Then it's just a matter of passing a keyword argument: myEntry = MyEntry(master, maxlen=20) What you have above is a tightly coiled, steaming dogpile that will litter your code base. Encapsulate that stench, would ya? sure, everyth

[tkinter] question about correct use of validation

2019-01-15 Thread steve
of characters in different entries of a form. code: #!/usr/bin/python # -*- coding: utf-8 -* from Tkinter import * class View(): def __init__(self, parent): self.parent = parent self.make_ui() def make_ui(self): ''' create

Re: How to display video files (mkv, wav, mp4 etc) within a TKinter widget?

2019-01-03 Thread Arie van Wingerden
Hi, in the meantime I am trying out what I found (after my question) here: https://solarianprogrammer.com/2018/04/21/python-opencv-show-video-tkinter-window/ If that doesn't play well, I'll try your suggestion. Many thanks! Op woensdag 2 januari 2019 19:06:05 UTC+1 schreef Vincent V

Re: How to display video files (mkv, wav, mp4 etc) within a TKinter widget?

2019-01-02 Thread Vincent Vande Vyvre
Le 2/01/19 à 15:17, Arie van Wingerden a écrit : I found (mostly fairly old stuff) some questions and a lot of (apparently often not working) Python code. 1. does TKinter offer such thing out of the box? 2. or is there another way using TKinter? 3. or do I need another GUI tool (e.g. QT) for

How to display video files (mkv, wav, mp4 etc) within a TKinter widget?

2019-01-02 Thread Arie van Wingerden
I found (mostly fairly old stuff) some questions and a lot of (apparently often not working) Python code. 1. does TKinter offer such thing out of the box? 2. or is there another way using TKinter? 3. or do I need another GUI tool (e.g. QT) for this? TIA -- https://mail.python.org/mailman

Re: tkinter resizable text with grid

2018-12-10 Thread lizhollinshead5
On Thursday, 6 December 2018 07:02:50 UTC, Paulo da Silva wrote: > Hi! > > Does anybody know why this code does not expand the text widget when I > increase the window size (with mouse)? I want height and width but as > minimum (or may be initial) size. > > import tkinter

Re: tkinter resizable text with grid

2018-12-07 Thread Paulo da Silva
Às 07:11 de 07/12/18, Christian Gollwitzer escreveu: > Am 07.12.18 um 03:00 schrieb Paulo da Silva: >> Às 21:15 de 06/12/18, Rick Johnson escreveu:  ... > So instead of complaining about lacking support in Tk, the > Python community should do their homework and provide wrappers to the > most c

Re: tkinter resizable text with grid

2018-12-06 Thread Christian Gollwitzer
Am 07.12.18 um 03:00 schrieb Paulo da Silva: Às 21:15 de 06/12/18, Rick Johnson escreveu: I kinda have a love/hate relationship with Tkinter and IDLE. On one hand i find them to be practical[2] and simple[3] and on the other, i find them to be poorly designed and unintuitive. And it

Re: tkinter resizable text with grid

2018-12-06 Thread Paulo da Silva
Às 21:15 de 06/12/18, Rick Johnson escreveu: > Paulo da Silva wrote: > ... > > In Tkinter, if you have a "container"[1] that only has a > single widget stuffed inside, and, you want that single > widget to expand to fill the extents of its parent > container, the

Re: tkinter resizable text with grid

2018-12-06 Thread Paulo da Silva
Às 08:24 de 06/12/18, Peter Otten escreveu: > Paulo da Silva wrote: > ... > > You have to set the column/row weight of the /master/: > > master.grid_columnconfigure(1, weight=1) > master.grid_rowconfigure(1, weight=1) Ok. That works! > > Also, columns and rows usually star

Re: tkinter resizable text with grid

2018-12-06 Thread Peter Otten
Paulo da Silva wrote: > Does anybody know why this code does not expand the text widget when I > increase the window size (with mouse)? I want height and width but as > minimum (or may be initial) size. > > import tkinter as tk > > class App: >

tkinter resizable text with grid

2018-12-05 Thread Paulo da Silva
Hi! Does anybody know why this code does not expand the text widget when I increase the window size (with mouse)? I want height and width but as minimum (or may be initial) size. import tkinter as tk class App: def __init__(self,master): self.tboard=tk.Text(master,height

Re: Python-Tkinter issue. Multiple overlaping event routines called by single click

2018-08-11 Thread Steven D'Aprano
On Sun, 12 Aug 2018 01:30:43 +0100, MRAB wrote: > On 2018-08-11 21:01, wfgazd...@gmail.com wrote: >> I have a main window open. Then I open a tk.TopLevel dialog window >> giving the user multiple choices. He selects one, the corresponding >> event is executed. Then in the underlining main windo

Re: Python-Tkinter issue. Multiple overlaping event routines called by single click

2018-08-11 Thread Steven D'Aprano
On Sat, 11 Aug 2018 13:01:44 -0700, wfgazdzik wrote: > I have a main window open. Then I open a tk.TopLevel dialog window > giving the user multiple choices. He selects one, the corresponding > event is executed. Then in the underlining main window, just by chance > there is another button exac

Re: Python-Tkinter issue. Multiple overlaping event routines called by single click

2018-08-11 Thread MRAB
On 2018-08-11 21:01, wfgazd...@gmail.com wrote: I have a main window open. Then I open a tk.TopLevel dialog window giving the user multiple choices. He selects one, the corresponding event is executed. Then in the underlining main window, just by chance there is another button exactly under

Re: Python-Tkinter issue. Multiple overlaping event routines called by single click

2018-08-11 Thread Peter Otten
wfgazd...@gmail.com wrote: > I have a main window open. Then I open a tk.TopLevel dialog window giving > the user multiple choices. He selects one, the corresponding event is > executed. Then in the underlining main window, just by chance there is > another button exactly under the mouse click

Python-Tkinter issue. Multiple overlaping event routines called by single click

2018-08-11 Thread wfgazdzik
I have a main window open. Then I open a tk.TopLevel dialog window giving the user multiple choices. He selects one, the corresponding event is executed. Then in the underlining main window, just by chance there is another button exactly under the mouse click in the TopLevel dialog window. I

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-12 Thread jkn
Hi All thanks for the comments and confirmation that this is not really possible in a Tkinter environment. I had thought of using ncurses but was shying clear of learning about another set of widgets etc. just now. The output of the simulator is simple enough that it could just accept

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Terry Reedy
On 7/11/2018 10:09 AM, jkn wrote: Hi All This is more of a Tkinter question rather than a python one, I think, but anyway... I have a Python simulator program with a Model-View_Controller architecture. I have written the View part using Tkinter in the first instance; later I plan to use Qt

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Rodrigo Bistolfi
You may want to check Urwid instead. 2018-07-11 16:22 GMT-03:00 Jim Lee : > On 07/11/18 07:09, jkn wrote: > >> Hi All >> This is more of a Tkinter question rather than a python one, I >> think, but >> anyway... >> >> I have a Python simu

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Jim Lee
On 07/11/18 07:09, jkn wrote: Hi All This is more of a Tkinter question rather than a python one, I think, but anyway... I have a Python simulator program with a Model-View_Controller architecture. I have written the View part using Tkinter in the first instance; later I plan to use Qt

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Chris Angelico
On Thu, Jul 12, 2018 at 12:09 AM, jkn wrote: > Hi All > This is more of a Tkinter question rather than a python one, I think, but > anyway... > > I have a Python simulator program with a Model-View_Controller architecture. I > have written the View part using Tkinter in

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Michael Torrie
On 07/11/2018 08:09 AM, jkn wrote: > So I am looking for confirmation of this, and/or whether there is any way of > running a Tkinter application in 'console' mode, running a main loop and> > both outputting data and accepting, and acting on, key presses. So far as I know,

Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread jkn
Hi All This is more of a Tkinter question rather than a python one, I think, but anyway... I have a Python simulator program with a Model-View_Controller architecture. I have written the View part using Tkinter in the first instance; later I plan to use Qt. However I also want to be able to

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-05 Thread MRAB
On 2018-06-06 02:42, Terry Reedy wrote: On 6/3/2018 3:54 PM, Jim Lee wrote: Given the following snippet (Python 3.6.5, Tk 8.6.8): What OS? Likely not Windows Already answered: Linux (Fedora 28, MATE desktop). import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-05 Thread Terry Reedy
On 6/3/2018 3:54 PM, Jim Lee wrote: Given the following snippet (Python 3.6.5, Tk 8.6.8): What OS? Likely not Windows import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox(root) cb.grid(row=0, column=0, sticky='NSEW') cb['values'] = ['on

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-05 Thread Jim Lee
On 06/05/2018 12:21 AM, Peter Otten wrote: Jim Lee wrote: Oops, I hit "reply" instead of "reply-list" last time. Trying again... On 06/03/2018 02:01 PM, Christian Gollwitzer wrote: Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk from tkinter import

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-05 Thread Peter Otten
Jim Lee wrote: > Oops, I hit "reply" instead of "reply-list" last time. Trying again... > > > On 06/03/2018 02:01 PM, Christian Gollwitzer wrote: >> Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk >>> from tkinter import ttk

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-04 Thread Jim Lee
Oops, I hit "reply" instead of "reply-list" last time.  Trying again... On 06/03/2018 02:01 PM, Christian Gollwitzer wrote: Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox(root) cb.grid(row=0, colu

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-03 Thread Christian Gollwitzer
Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox(root) cb.grid(row=0, column=0, sticky='NSEW') cb['values'] = ['one', 'two', 'three', 'four'] root.mainloop() T

tkinter (ttk) combobox dropdown text is white on white

2018-06-03 Thread Jim Lee
Given the following snippet (Python 3.6.5, Tk 8.6.8): import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox(root) cb.grid(row=0, column=0, sticky='NSEW') cb['values'] = ['one', 'two', 'three', 'four'] root.main

Re: Tkinter and root vs. Wayland

2018-05-22 Thread Terry Reedy
On 5/22/2018 5:52 PM, Grant Edwards wrote: For a couple decades now, I've been distributing a couple smallish Tkinter applications that need to run as root for a variety of reasons (raw Ethernet access, starting/stopping daemons, loading and unloading kernel modules, reading and writing c

Tkinter and root vs. Wayland

2018-05-22 Thread Grant Edwards
For a couple decades now, I've been distributing a couple smallish Tkinter applications that need to run as root for a variety of reasons (raw Ethernet access, starting/stopping daemons, loading and unloading kernel modules, reading and writing config files that are owned by root). As pa

Re: Is this a bug or a feature in TkInter?

2018-05-11 Thread Terry Reedy
On 5/11/2018 2:57 AM, Cuthbert Milligen wrote: Hi Terry, many thanks for your detailed explanation! (I can't see how to 'reply' under your post...) Followup to the list rather than reply to me, as you did, is the right thing to do. -- Terry Jan Reedy -- https://mail.python.org/mailman/li

Re: Is this a bug or a feature in TkInter?

2018-05-11 Thread Cuthbert Milligen
Hi Terry, many thanks for your detailed explanation! (I can't see how to 'reply' under your post...) -- https://mail.python.org/mailman/listinfo/python-list

Re: Is this a bug or a feature in TkInter?

2018-05-11 Thread Cuthbert Milligen
Found it! Thanks again :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Is this a bug or a feature in TkInter?

2018-05-10 Thread Terry Reedy
On 5/10/2018 2:12 PM, charmingold...@gmail.com wrote: I'm learning to use TkInter in Python and came across this example program from 'Thinking in TkInter' (http://thinkingtkinter.sourceforge.net) - see below. Two buttons 'button1' and 'button2' are de

Is this a bug or a feature in TkInter?

2018-05-10 Thread charmingoldgit
I'm learning to use TkInter in Python and came across this example program from 'Thinking in TkInter' (http://thinkingtkinter.sourceforge.net) - see below. Two buttons 'button1' and 'button2' are defined. The bug is that event.widget returns '.!fram

Re: tkinter frame not expanding to fit window?

2018-04-17 Thread Peter Otten
w why. Any suggestions? > > This is all running on Ubuntu MATE 17.10 and tk8.6. Here is a minimalistic example with a red Frame in a blue window: import tkinter as tk root = tk.Tk() root["background"] = "blue" frame = tk.Frame(root, background="red") fram

tkinter frame not expanding to fit window?

2018-04-17 Thread Zobeid Zuma
I've just started working through the tutorial here → http:// www.tkdocs.com/tutorial/firstexample.html and I already hit some behavior that I don't understand. The frame doesn't expand when I resize the window! The tutorial says these lines should do it: mainframe.columnconfigure(0, wei

Re: [Tkinter]Validation to multiple Entry widgets

2018-02-17 Thread Beppe
Il giorno sabato 17 febbraio 2018 20:21:53 UTC+1, Peter Otten ha scritto: > Beppe wrote: > > > I would validate values input, on key, in multiple Entry widgets create at > > run time > > > > I wrote this snip but even if the entry are created and the callback work > > well the relative value is m

Re: [Tkinter]Validation to multiple Entry widgets

2018-02-17 Thread Peter Otten
Beppe wrote: > I would validate values input, on key, in multiple Entry widgets create at > run time > > I wrote this snip but even if the entry are created and the callback work > well the relative value is missing > my_list = (2.14,18.3,76.4,2.38,0.425,2.68,1.09,382,8.59,0.495)

[Tkinter]Validation to multiple Entry widgets

2018-02-17 Thread Beppe
hi all, I would validate values input, on key, in multiple Entry widgets create at run time I wrote this snip but even if the entry are created and the callback work well the relative value is missing #!/usr/bin/python3 import tkinter as tk class Application(tk.Frame): def __init__(self

Re: tkinter MP working like a charm

2018-01-01 Thread Wu Xi
; abdurrahmaanjanhangeer.wordpress.com > > On 31 Dec 2017 5:00 am, "Wu Xi" wrote: > >> from tkinter import *#I cant see Lügen Presse = lying press , fake news makers - indeed. Using a real news reader, changing the post's topic

Re: tkinter MP working like a charm - almost...

2018-01-01 Thread Wu Xi
from tkinter import * ; from tkinter import messagebox import asyncio , random async def one_url(url): """ This is a multi threaded tkinter demo where tasks run in the background and aim to not freeze the tk GUI, py v3.7""" sec = random.randint(1,

Re: tkinter MP working like a charm

2017-12-31 Thread Abdur-Rahmaan Janhangeer
wrote: > from tkinter import *#I cant see > anything wrong with this , it works like a charm > from tkinter import messagebox #is there a > serious concern doing things his way ? > import asyncio , threading , random

Re: tkinter MP working like a charm

2017-12-31 Thread Terry Reedy
On 12/31/2017 8:52 PM, Terry Reedy wrote: To do everything in the main thread, one can replace 'root.mainloop' with loop.run_forever (in the main thread) and repeated root.update calls. Wu Xi's example, rewritten more or less as suggested: from tkinter import * from tkinter im

Re: tkinter MP working like a charm

2017-12-31 Thread Terry Reedy
On 12/30/2017 7:57 PM, Wu Xi wrote: from tkinter import *#I cant see anything wrong with this , it works like a charm This imports about 200 names. A reader may not know which names are builtins and which are imports. There may also be accidental

Re: Python: asyncio and Tkinter (Posting On Python-List Prohibited)

2017-12-31 Thread Wu Xi
Lawrence D’Oliveiro: > On Sunday, December 31, 2017 at 12:47:21 PM UTC+13, Wu Xi wrote: >> this is kinda interesting. seems there is no easy way though > > If I could do it for GTK/GLib , I don’t see > why Tk should be hard. ;) well, hard or no, but glibcoro is

Re: tkinter MP working like a charm (Posting On Python-List Prohibited)

2017-12-31 Thread Wu Xi
Lawrence D’Oliveiro: > On Sunday, December 31, 2017 at 10:23:32 PM UTC+13, Wu Xi wrote: >> >> I was originally referring to the handling of multi-tasking... which >> some found a bit outlandish. >> >> I cannot see why, though. > > I just can’t help thinking that you are using two threads to handle

Re: tkinter MP working like a charm

2017-12-31 Thread Wu Xi
OK, I never figured out that "import *" business... I was originally referring to the handling of multi-tasking via the root.mainloop() if __name__ == '__main__': async_loop = asyncio.get_event_loop()# all in this loop submain(async_loop) business , which some found a

Re: tkinter MP working like a charm

2017-12-31 Thread Chris Angelico
en you read the code, you can instantly tell that "x.ALL" is not the same as the built-in "all" function, but it's less obvious if they're both just simple names. Some modules are designed to be star-imported (tkinter being one of them), but even there - and *definitely*

Re: tkinter MP working like a charm

2017-12-31 Thread Abdur-Rahmaan Janhangeer
@Chris hum nice point it seems to be related to namespace convenience like 1 from x import * is likelier to cause conflicts than 2 import x Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 31 Dec 2017 05:00, "Wu Xi" wrote: > from t

Re: tkinter MP working like a charm

2017-12-30 Thread Chris Angelico
On Sun, Dec 31, 2017 at 4:02 PM, Abdur-Rahmaan Janhangeer wrote: > for beginners import * is probably fine. Even if you are using most modules > then too. else if module small maybe ok too > > just when you import just what you need, you save on resources . > Actually no; the entire module still

Re: tkinter MP working like a charm

2017-12-30 Thread Abdur-Rahmaan Janhangeer
ot; wrote: > from tkinter import *#I cant see > anything wrong with this , it works like a charm > from tkinter import messagebox #is there a > serious concern doing things his way ? > import asyn

tkinter MP working like a charm

2017-12-30 Thread Wu Xi
from tkinter import *#I cant see anything wrong with this , it works like a charm from tkinter import messagebox #is there a serious concern doing things his way ? import asyncio , threading , random

Re: Python: asyncio and Tkinter

2017-12-30 Thread Wu Xi
this is kinda interesting. seems there is no easy way though -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter,show pictures from the list of files in catalog-problem

2017-12-30 Thread Wu Xi
nothing works in ure soft everything breaks -- https://mail.python.org/mailman/listinfo/python-list

Re: Python: asyncio and Tkinter

2017-12-20 Thread c.buhtz
X-Post: <https://mail.python.org/pipermail/tkinter-discuss/2017-December/003927.html> Dear Chris. On 2017-12-21 00:42 Chris Angelico wrote: > I would recommend threading. You can run your GUI event loop on one > thread, and your network I/O loop on another thread. Thank you very m

Re: Tkinter,show pictures from the list of files in catalog-problem

2017-12-20 Thread Ziggy
On 2017-12-19, MRAB wrote: >> > The function called by .after should return to the tkinter's event loop. > If you want to display a sequence of pictures, then the function should > call .after to make it call the function again. > > Here's a slightly reworked version: Thanks. I like your soluti

Re: Python: asyncio and Tkinter

2017-12-20 Thread Chris Angelico
On Wed, Dec 20, 2017 at 10:42 AM, wrote: > I am looking for an "elegant" and "official" way to use asyncio in > Tkinter applications. The goal is that the GUI is not freezing while > doing some download-tasks (over 100 files from different locations). > > ...

Python: asyncio and Tkinter

2017-12-20 Thread c.buhtz
I am looking for an "elegant" and "official" way to use asyncio in Tkinter applications. The goal is that the GUI is not freezing while doing some download-tasks (over 100 files from different locations). I am looking around on the web for solutions but couldn't find o

<    1   2   3   4   5   6   7   8   9   10   >