Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB
On 2023-01-11 00:13, Cameron Simpson wrote: On 10Jan2023 18:32, MRAB wrote: I don't like how you're passing Thread...start as an argument. IMHO, it would be better/cleaner to pass a plain function, even if the only thing that function does is to start the thread. Yes, and this is likely the

Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Cameron Simpson
On 10Jan2023 18:32, MRAB wrote: I don't like how you're passing Thread...start as an argument. IMHO, it would be better/cleaner to pass a plain function, even if the only thing that function does is to start the thread. Yes, and this is likely the thing causing the cited exception "threads

Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB
On 2023-01-10 14:57, Abhay Singh wrote: Here is the entire code snippet of the same. Please help def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, controller): global counter, canvas, my_image, chosen, flag, directory canvas.delete('all') button5['state'] =

Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Abhay Singh
Here is the entire code snippet of the same. Please help def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, controller): global counter, canvas, my_image, chosen, flag, directory canvas.delete('all') button5['state'] = DISABLED counter += 1 chosen, options_text =

[issue38292] tkinter variable classes don't link to widget if matplotlib's set_cmap() function is called before the tkinter GUI is instantiated

2019-09-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: You neglected to state the observation that led to the conclusion of 'not linked'. Using 3.8 on Win10, I replaced "plt.set_cmap('x')" with "tk.Tk()". Then, clicking the button prints 'False' even when the checkbutton is checked. After either removing

[issue38292] tkinter variable classes don't link to widget if matplotlib's set_cmap() function is called before the tkinter GUI is instantiated

2019-09-27 Thread Amir Emami
New submission from Amir Emami : TkInter variable classes don't link to a widget (tested on Checkbutton and Scale) if matplotlib.pyplot.set_cmap() function is called before the tkinter.Tk() call which instantiates the root of a TkInter GUI. There is no problem if it is called after

Python program to run commands on cmd.exe from a tkinter GUI input box

2017-05-18 Thread Sanjay Yadav
Can anybody help or share a python code using Tkinter for opening cmd.exe and running command given from input box. For eg. when I run the code it will ask IP in an input box gui and ping response for that IP will be on cmd console -- https://mail.python.org/mailman/listinfo/python-list

Problem Running tkinter gui Code

2015-12-27 Thread brian . moreira
Hi there. I trying to run a simple code that opens a Tkinter window with text in it, on my windows 8 machine using Python 3.4.3 I used to ge: “ImportError: no tkinter module exists” But now it opens a windows Wizard screen that prompts me to Modify, Repair, or Uninstall Python. I have tried

Re: Problem Running tkinter gui Code

2015-12-27 Thread Zachary Ware
On Sat, Dec 26, 2015 at 10:59 PM, brian.moreira wrote: > I trying to run a simple code that opens a Tkinter window with text in it, on > my windows 8 machine using Python 3.4.3 Hi Brian, Details are important, and there are several missing from your question that

Re: Tkinter GUI Error

2014-01-14 Thread Lewis Wood
I cannot say how grateful I am to find such a community willing to help 3 Thanks to everyone posting, learned a lot of new stuff :) Never knew you could just bring a local var into a def block using global inside of the function. Again, thanks for taking your time to help out newbies to

Re: Tkinter GUI Error

2014-01-14 Thread Lewis Wood
Also anyone know how to create an entry box for Tkinter where you can only enter in 2 digits? -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter GUI Error

2014-01-14 Thread Christian Gollwitzer
Am 14.01.14 22:27, schrieb Lewis Wood: Also anyone know how to create an entry box for Tkinter where you can only enter in 2 digits? You must use a validator to achieve this. This is a more advanced topic though. A validator is a function that is called whenever the user keys something in -

Tkinter GUI Error

2014-01-13 Thread fluttershy363
Inside the function is where I am having the problem, I am trying to get it to delete the label so that it may then replace it with a shorter text. Here is the full code: from tkinter import * import random main = Tk() main.title(Crack the Code) def check1(): entry = entry1var.get()

Re: Tkinter GUI Error

2014-01-13 Thread Lewis Wood
Forgot to mention I am using Python 3.3.3 -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter GUI Error

2014-01-13 Thread Christian Gollwitzer
Am 13.01.14 19:49, schrieb fluttershy...@gmail.com: Inside the function is where I am having the problem, I am trying to get it to delete the label so that it may then replace it with a shorter text. Here is the full code: from tkinter import * import random main = Tk() main.title(Crack

Re: Tkinter GUI Error

2014-01-13 Thread Lewis Wood
When I try to use the labelent1.configure, it greets me with an error: AttributeError: 'NoneType' object has no attribute 'configure' I changed the labelent's to global. Don't suppose you know why? Also how would I go about using an object for the entire window. I am still a Novice at Tkinter

Re: Tkinter GUI Error

2014-01-13 Thread Peter Otten
fluttershy...@gmail.com wrote: Inside the function is where I am having the problem, I am trying to get it to delete the label so that it may then replace it with a shorter text. Here is the full code: def check1(): entry = entry1var.get() if entry == num1:

Re: Tkinter GUI Error

2014-01-13 Thread Rick Johnson
On Monday, January 13, 2014 12:49:07 PM UTC-6, Lewis Wood wrote: labelent1 = Label(main, text=Correct!,fg=green).grid(row = 0, column = 3) [snip] UnboundLocalError: local variable 'labelent1' referenced before assignment Observe the following interactive session and prepare to be

Re: Tkinter GUI Error

2014-01-13 Thread Chris Angelico
On Tue, Jan 14, 2014 at 5:49 AM, fluttershy...@gmail.com wrote: entry = entry1var.get() if entry == num1: elif entry num1: elif entry num1: num1 =str(random.randint(10,99)) num2 =str(random.randint(10,99)) num3 =str(random.randint(10,99)) mastercode = num1+num2+num3 Be

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-04 Thread Beinan Li
Thank you so much Jerry. I should have read though the man page more carefully. The available online cscope tutorials never mentioned the line-oriented mode. On Sat, Jan 4, 2014 at 1:35 AM, Jerry Hill malaclyp...@gmail.com wrote: On Fri, Jan 3, 2014 at 9:44 PM, Beinan Li li.bei...@gmail.com

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-04 Thread Beinan Li
... and thanks to Chris too. Now I got the better idea how the subprocess module works. On Sat, Jan 4, 2014 at 11:29 AM, Beinan Li li.bei...@gmail.com wrote: Thank you so much Jerry. I should have read though the man page more carefully. The available online cscope tutorials never mentioned

How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Beinan Li
I know how to make a GUI program work on top of a console program like ls, which exits immediately. But some console programs have their own shell or ncurse-like CUI, such as cscope. So I figured that I need to first subprocess.popen a bidirectional pipe and send command through stdin and get

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 1:44 PM, Beinan Li li.bei...@gmail.com wrote: But some console programs have their own shell or ncurse-like CUI, such as cscope. So I figured that I need to first subprocess.popen a bidirectional pipe and send command through stdin and get results from stdout and stderr.

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Jerry Hill
On Fri, Jan 3, 2014 at 9:44 PM, Beinan Li li.bei...@gmail.com wrote: But some console programs have their own shell or ncurse-like CUI, such as cscope. So I figured that I need to first subprocess.popen a bidirectional pipe and send command through stdin and get results from stdout and stderr.

Tkinter GUI Question-Infinite Loop

2013-03-08 Thread prquinn
Greetings, I'm trying to run a simple Tkinter program that opens a program when you click a button. The code is listed below. I use a command to call a program that then calls a fortran program. However, when I click on the button, it opens the program but the menu of the program i'm

Re: Tkinter GUI Question-Infinite Loop

2013-03-08 Thread MRAB
On 08/03/2013 14:04, prqu...@gmail.com wrote: Greetings, I'm trying to run a simple Tkinter program that opens a program when you click a button. The code is listed below. I use a command to call a program that then calls a fortran program. However, when I click on the button, it opens the

Re: tkinter / gui

2013-02-24 Thread inq1ltd
On Saturday, February 23, 2013 02:50:43 PM Rex Macey wrote: Here is one general and one specific question about creating GUIs using tkinter from a newbie. I have created a class in which to hold some data. I want to create a GUI to get the data from the user and store it in the object.

Re: tkinter / gui

2013-02-24 Thread Rick Johnson
On Saturday, February 23, 2013 4:50:43 PM UTC-6, Rex Macey wrote: Here is one general and one specific question about creating GUIs using tkinter from a newbie. I have created a class in which to hold some data. I want to create a GUI to get the data from the user and store it in the

tkinter / gui

2013-02-23 Thread Rex Macey
Here is one general and one specific question about creating GUIs using tkinter from a newbie. I have created a class in which to hold some data. I want to create a GUI to get the data from the user and store it in the object. Browsing the web I see that a lot of examples on GUIs have the

Re: Keeping a Tkinter GUI alive during a long running process

2012-12-29 Thread Grant Edwards
On 2012-12-21, Kevin Walzer k...@codebykevin.com wrote: I maintain a Tkinter application that's a front-end to to a package manger, and I have never been able to find a way to keep the app from locking up at some point during the piping in of the package manager's build output into a text

Re: Keeping a Tkinter GUI alive during a long running process

2012-12-26 Thread Russell E. Owen
In article kb0jjh$7pm$1...@dont-email.me, Kevin Walzer k...@codebykevin.com wrote: I maintain a Tkinter application that's a front-end to to a package manger, and I have never been able to find a way to keep the app from locking up at some point during the piping in of the package manager's

Keeping a Tkinter GUI alive during a long running process

2012-12-20 Thread Kevin Walzer
I maintain a Tkinter application that's a front-end to to a package manger, and I have never been able to find a way to keep the app from locking up at some point during the piping in of the package manager's build output into a text widget. At some point the buffer is overwhelmed and the app

Re: Python 2.4.4 Tkinter GUI Example for Modeless Dialog with Menu, Edit, List, Buttons, File Save etc.

2010-06-17 Thread Michael Torrie
On 06/16/2010 04:05 PM, My Python wrote: I would like to see some substantial example of an App written for a Modeless Dialog (fixed size, non resizable window) (If you have used WIndows MFC or Visual Basic you all know how elegant it is) What is elegant about a fixed-size, non-re-sizable

Re: Python 2.4.4 Tkinter GUI Example for Modeless Dialog with Menu, Edit, List, Buttons, File Save etc.

2010-06-17 Thread Michael Torrie
On 06/17/2010 12:50 AM, Michael Torrie wrote: On 06/16/2010 04:05 PM, My Python wrote: I would like to see some substantial example of an App written for a Modeless Dialog (fixed size, non resizable window) Tk? PyQt? PyGTK? wxPython? Nevermind that question. You stated that in your subject

Python 2.4.4 Tkinter GUI Example for Modeless Dialog with Menu, Edit, List, Buttons, File Save etc.

2010-06-16 Thread My Python
I would like to see some substantial example of an App written for a Modeless Dialog (fixed size, non resizable window) (If you have used WIndows MFC or Visual Basic you all know how elegant it is) with Buttons, menus, edit boxes, list boxes, file save as dialogs popping from the button action

Re: Python 2.4.4 Tkinter GUI Example for Modeless Dialog with Menu, Edit, List, Buttons, File Save etc.

2010-06-16 Thread rantingrick
On Jun 16, 5:05 pm, My Python mypython_2...@yahoo.com wrote: I would like to see some substantial example of an App written for a Modeless Dialog (fixed size, non resizable window) (If you have used WIndows MFC or Visual Basic you all know how elegant it is) with Buttons, menus, edit boxes,

Re: New to Tkinter GUI building

2007-03-02 Thread Eric Brunel
On Thu, 01 Mar 2007 21:01:40 +0100, Adam [EMAIL PROTECTED] wrote: Ok the window has resized but the elements inside are still like they were, so they are going off the edge on the window. How can I get these to resize? I have put sizes on the frames they are in. Sorry to keep asking but I'm

Re: New to Tkinter GUI building

2007-03-02 Thread Adam
Thanks for the reply, will work with this tomorrow. Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: New to Tkinter GUI building

2007-03-01 Thread Adonis Vargas
Adam wrote: On Feb 28, 9:13 pm, Adonis Vargas [EMAIL PROTECTED] wrote: Adam wrote: snip I think my main questions are: 1. How can I get the Window to be sized the way I want it? 2. How can I get the Scrollbars to fill the side of the text box instead of being small? (like .pack(fill=

Re: New to Tkinter GUI building

2007-03-01 Thread Adam
Ok the window has resized but the elements inside are still like they were, so they are going off the edge on the window. How can I get these to resize? I have put sizes on the frames they are in. Sorry to keep asking but I'm flying blind here, I have checked the python site and the intro to

New to Tkinter GUI building

2007-02-28 Thread Adam
Hey, I'm pretty new to programming. Been trying to learn using Python. The code I'm struggling with is for my GUI. I'm am having trouble getting this to display the way I want with the grid manager. Can anybody tell me what I am doing wrong? I hope you can tell what look I'm trying to achieve

Re: New to Tkinter GUI building

2007-02-28 Thread Adonis Vargas
Adam wrote: snip I think my main questions are: 1. How can I get the Window to be sized the way I want it? 2. How can I get the Scrollbars to fill the side of the text box instead of being small? (like .pack(fill= tk.Y) snip I have only posted the code relevant to the GUI. TIA Adam

Re: New to Tkinter GUI building

2007-02-28 Thread Adam
On Feb 28, 9:13 pm, Adonis Vargas [EMAIL PROTECTED] wrote: Adam wrote: snip I think my main questions are: 1. How can I get the Window to be sized the way I want it? 2. How can I get the Scrollbars to fill the side of the text box instead of being small? (like .pack(fill= tk.Y) snip

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Mohammad Tayseer
I don't know why this happen. do you call mainloop() inside the test3.py?? you shouldn't Michael Yanowitz [EMAIL PROTECTED] wrote: Presently what happens is that the script takes over and all the buttons on the GUI disappear as the GUI is not given any cpu time to refresh or check

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Michael Yanowitz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mohammad Tayseer Sent: Monday, December 18, 2006 11:28 AM To: python-list@python.org Subject: RE: Can a Tkinter GUI check for abort script: I don't know why this happen. do you call mainloop() inside the test3

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Mohammad Tayseer
Michael Yanowitz [EMAIL PROTECTED] wrote: What I am hoping for is a function call I can make, without knowing any of the GUI objects, I can call from test3.py (or while test3.py is running) which will refresh the GUI and check for activity such as button presses on the GUI itself.

Re: Can a Tkinter GUI check for abort script:

2006-12-19 Thread hg
Michael Yanowitz wrote: Hello: I have successfully implemented a Tkinter GUI which has this (simplified here for explanation): +-+ | filename: [./test3.py] | | | | [Run Script

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Michael Yanowitz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of hg Sent: Tuesday, December 19, 2006 9:44 AM To: python-list@python.org Subject: Re: Can a Tkinter GUI check for abort script: Michael Yanowitz wrote: Hello: I have successfully implemented a Tkinter

Re: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Hendrik van Rooyen
is the rub - the tkinter gui and the sockets stuff both want to be the main thread. You are going to have to run separate processes, and communicate via pipes. Its a hard nut to chew, but there you have it - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Can a Tkinter GUI check for abort script:

2006-12-18 Thread Michael Yanowitz
Hello: I have successfully implemented a Tkinter GUI which has this (simplified here for explanation): +-+ | filename: [./test3.py] | | | | [Run Script

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Hendrik van Rooyen
Michael Yanowitz [EMAIL PROTECTED] Wrote: Hello: I have successfully implemented a Tkinter GUI which has this (simplified here for explanation): +-+ | filename: [./test3.py] | | | | [Run Script

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Mohammad Tayseer
To view a button hide the other, call .pack_forget() on the button you want to hide pack() on the button you want to show test3.py should contains a main() function that returns the new window. if you press 'Abort script' button you should call new_window.destroy(), pack_forget() the current

RE: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Michael Yanowitz
] [mailto:[EMAIL PROTECTED] Behalf Of Mohammad Tayseer Sent: Monday, December 18, 2006 10:40 AM To: python-list@python.org Subject: Re: Can a Tkinter GUI check for abort script: To view a button hide the other, call .pack_forget() on the button you want to hide pack() on the button you

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Hendrik van Rooyen
Michael Yanowitz top posted: Presently what happens is that the script takes over and all the buttons on the GUI disappear as the GUI is not given any cpu time to refresh or check if any activity in the dialog. Yuk! you may have to run the script in a thread then, to preserve the GUI

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-14 Thread Maric Michaud
Le dimanche 13 août 2006 16:01, [EMAIL PROTECTED] a écrit : No neep for thread or Tix modules...! Module thread is always available (at less on platforms where Tkinter is available), while Tix in my example is just intended to use the Meter widget (a progress bar). # this will *sleep* one

Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Pasi Oja-Nisula
and put some kind of loading image 25/50 text there while processing the images. So now I construct the simple Tkinter gui in init and when mainloop is called the gui is shown. The question is how (or where) can I call my loadImages function right after the mainloop starts? Or is there a better way

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Maric Michaud
Le dimanche 13 août 2006 12:39, Pasi Oja-Nisula a écrit : The question is how (or where) can I call my loadImages function right after the mainloop starts? Or is there a better way to do this? Seems a good use case for multi-thread, try something like this : In [28]: import Tix In [29]:

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread jmdeschamps
Maric Michaud wrote: Le dimanche 13 août 2006 12:39, Pasi Oja-Nisula a écrit : The question is how (or where) can I call my loadImages function right after the mainloop starts? Or is there a better way to do this? Seems a good use case for multi-thread, try something like this : In

Re: Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Pasi Oja-Nisula
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Tkinter also has a timer-type function called *after*. Use this to call your init function just befrore the mainloop call. You gui wil show up and you can then update it to show progress as you wish No neep for thread or Tix modules...!

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-26 Thread Cam
Ah, what I was referring to (somewhat in jest) was something to automatically *write* the code needed by the application. Simply executing it is easy enough and in fact Rapyd-Tk already does this via the save-build-run project-menu choice. vbgunz wrote: As for the code to actually make the

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-26 Thread vbgunz
Ah, what I was referring to (somewhat in jest) was something to automatically *write* the code needed by the application. Simply executing it is easy enough and in fact Rapyd-Tk already does this via the save-build-run project-menu choice. sorry I misunderstood you. --

Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
Hello world, I tried looking everywhere for a decent Tkinter GUI builder and the closest I got to finding one before being horrified from looking at the source was vtcl @ http://vtcl.sourceforge.net. The next closest thing was page @ http://page.sourceforge.net/ Page just didn't cut it for me

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
Thank you very much for the link and info. It looks promising but I am still on the lookout for a drag-n-drop Gui builder like vltc so if anyone has more links to new projects I am definitely interested! PS. I do love the code generated from rapyd! --

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread Bob Greschke
vbgunz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thank you very much for the link and info. It looks promising but I am still on the lookout for a drag-n-drop Gui builder like vltc so if anyone has more links to new projects I am definitely interested! PS. I do love the code

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread Cam
What are you building? I routinely do things like these by hand www.greschke.com/unlinked/images/changeo.jpg www.greschke.com/unlinked/images/pocus.jpg www.greschke.com/unlinked/images/pis.jpg www.greschke.com/unlinked/images/petm.jpg and I can't imagine using a builder for anything

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
What are you building? I routinely do things like these by hand www.greschke.com/unlinked/images/changeo.jpg www.greschke.com/unlinked/images/pocus.jpg www.greschke.com/unlinked/images/pis.jpg www.greschke.com/unlinked/images/petm.jpg and I can't imagine using a builder for anything 'simpler'.

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
As for the code to actually make the application go, well, if there is some automatic way to make that happen it hasn't dawned on me yet. why not execute 'python -u /pathto/module.py' I could be wrong but hope I am not :) -- http://mail.python.org/mailman/listinfo/python-list

splitting Tkinter gui into several files

2005-11-13 Thread jarhead
My Tkinter app's gui file grew to the point that i wanted to split it into several files: menus.py, mainFrame,py, buttons.py, etc. Of course, when i moved the menu code into its own file, then did import menus in the main gui file, it died because of references in the menus file to stuff in the