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 c

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'] = DISABLED

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 = func

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

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 make any advice just guesswork

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: 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 - e

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 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 program

Re: Tkinter GUI Error

2014-01-13 Thread Chris Angelico
On Tue, Jan 14, 2014 at 5:49 AM, 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 careful of c

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 e

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: > labelent1

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 and

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 th

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

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: 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 wrote: > 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

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 wrote: > On Fri, Jan 3, 2014 at 9:44 PM, Beinan Li wrote: > > But some console programs have

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 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. > > But in such

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 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. > > But in such

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

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 pr

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 calling

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 > ob

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. B

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 for

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

2012-12-29 Thread Grant Edwards
On 2012-12-21, Kevin Walzer 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 widget. At some p

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

2012-12-26 Thread Russell E. Owen
In article , Kevin Walzer 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 widget. At some po

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 s

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

2010-06-16 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 su

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

2010-06-16 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 w

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 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, list boxes, file save

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 (thi

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-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 bu

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 tkinte

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: >> >> >> >>> 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? (l

Re: New to Tkinter GUI building

2007-02-28 Thread Adam
On Feb 28, 9:13 pm, Adonis Vargas <[EMAIL PROTECTED]> wrote: > Adam wrote: > > > > > 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

Re: New to Tkinter GUI building

2007-02-28 Thread Adonis Vargas
Adam wrote: > 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) > > > I have only posted the code relevant to the GUI. > > TIA > Adam >

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 fro

Re: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Hendrik van Rooyen
ep(), will it do this? ok here 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

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 impl

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] | > |

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 itse

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

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 ch

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 main

RE: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Michael Yanowitz
al Message- From: [EMAIL PROTECTED] [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 w

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 curren

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] | > |

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: 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 m

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: 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 : >

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]: ma

Newbie doing lengthy initialization with Tkinter gui

2006-08-13 Thread Pasi Oja-Nisula
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 ther

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. -- http://mail.pytho

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 ap

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

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 'simpl

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 anyth

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 th

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! -- http://mail.python.org/mailman/listinfo/pyth

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

2006-05-23 Thread Fuzzyman
vbgunz wrote: > 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.sourcef

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 f

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 m