Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
74 views

I am using Tkinter with Python 3.11 on Windows. The following program creates a simple window with a menu. The user would click "Game -> Select game directory", whereupon ...
Mike Duke's user avatar
  • 235
0 votes
0 answers
43 views

coming from an amateur level of javascript I just started messing around with python and tried to write a small script that checks if a lock file (selected by the user) exists over and over again and ...
Rob's user avatar
  • 1
-2 votes
1 answer
137 views

I try to add Error-Messages to my code. Each of those I want to display in a separate tkinter Toplevel window. So far so good. But for this I need to pause my code after the Error-Window was created ...
ihaveaproblem's user avatar
0 votes
0 answers
74 views

I need to implement a custom Cocoa main loop using metal-cpp (the source code is also available here). I use an extended version of metal-cpp, so all called below methods were implemented in my ...
Denis Steinman's user avatar
1 vote
2 answers
120 views

I have a 3rd party library with mainloop. I want to use GLib/Gtk with the app I'm developing. Is it possible to integrate GLib mainloop into another host? The host loop allows to register an fd and ...
haael's user avatar
  • 1,069
0 votes
1 answer
176 views

I am looking for Tkinter mainloop() alternative that continues code after window is destroyed. Currently my code is written as follows: root = tk.Tk() recObj = Twiz_Soft.Recorder() app = MyApp(root,...
MtLeftovers's user avatar
0 votes
1 answer
835 views

Currently, whenever I create a new window in a Tkinter program, I use a function with Toplevel(), including .mainloop(), like this: def MainWindow(): root = Tk() #A button that calls SubWindow(...
mwolfe 11's user avatar
  • 181
0 votes
1 answer
36 views

So I am trying to make a matrix 6x6 with buttons. When I right click on the a button, the menu window should pop up with a list of options. In this case, it's mix and escape. When I click on any of ...
Annie's user avatar
  • 11
0 votes
1 answer
121 views

I am trying to make an antivirus application but I met some issue. And Tkinter window says (not responding) but code is running. I wanted to use threading, but firstly it's not convenient, secondly it ...
Pythoner's user avatar
0 votes
1 answer
780 views

I am new to Rust and i am learning it, however when i search for information around this issue, there is simply no information. The problem exists in the main loop of the program for which the code ...
fluffy-soft-dev's user avatar
0 votes
0 answers
85 views

I'm trying to write a simple console game, space shooter -ish. The game runs on main loop. I want to use multithreading to manage shooting projectiles and another for movement of the enemy. How should ...
Tom Cruise's user avatar
0 votes
2 answers
358 views

For some reason the mainloop() is not ending. The final print statement never gets triggered but everything else does. Any idea what is causing this or how to resolve it? It happens even without the ...
Justin Oberle's user avatar
1 vote
1 answer
1k views

this question has been asked many times but to be honest I don't quite understand why do I get this error "RuntimeError: main thread is not in main loop". I have the following code to read ...
cbroggi's user avatar
  • 23
2 votes
2 answers
1k views

Let say I've a list of widgets that are generated by tkinter uisng a loop (it's customtkinter in this case but since tkinter is more well known so I think it'd be better to make an example with it), ...
V21's user avatar
  • 57
0 votes
1 answer
55 views

i made a messenger that works with the socket library. it has 2 sides : server and client. i later decided to make a GUI for it , too. ( with tkinter ) when i was making it , i realized that programs ...
Parsa Ad's user avatar
0 votes
1 answer
114 views

When closing an instance of the ChildWindow class, which was called from another instance of MainWindow, the code does not continue to be executed. I noticed that only when the MainWindow instance is ...
chikibamboni's user avatar
0 votes
0 answers
69 views

I'm doing a project where I read info from a socket and then intend to display it on a gui using tkinter. The thing is, my read info from socket is a loop and for the gui I need another loop. I'm ...
LASO's user avatar
  • 1
4 votes
2 answers
2k views

What I mean by this is can you make the program open the window more than once by putting the mainloop() function in a for loop or a while loop? It would probably look something like this: for i in ...
MathGeek's user avatar
  • 151
0 votes
1 answer
1k views

I need help using tkinter in python. I want to use a while loop inside my class so that it keeps printing in the terminal the content of an entry (box1). But the problem is that if I put a loop in my ...
user avatar
0 votes
1 answer
140 views

I'm developing an application what have its functions set in different files. The main file have a tkinter interface and the buttons, entrys and labels are in other file, like this: Mainfile.py from ...
Jean Menezes da Silva's user avatar
1 vote
1 answer
80 views

Coders, I guess I have a newbie question: my windows disappears when I click on a button. If I put in root.mainloop() as last line in the buttonClicked-function, then the program is fine - but it ...
texpiet's user avatar
  • 113
0 votes
0 answers
202 views

I intend to collect names in lists that will be used in a program, one at a time. The function does return a list and the whole program runs once, but after I call the function UserInput with the ...
L F's user avatar
  • 1
1 vote
1 answer
1k views

I want to run a function alongside the main loop of a window. I have this code: from tkinter import * window = Tk() def task(): print("hello") window.after(1000, task) window....
LukasFun's user avatar
  • 229
0 votes
1 answer
113 views

I have been trying to make a Fangame for Undertale with pygame but i am stuck. This is my first project. I want to replay the main loop with a few changes, for example i want the knife movement to be ...
Stijn van Schaik's user avatar
0 votes
2 answers
82 views

how do i get the return from button command also tried without lambda doesn't work import tkinter as tk #value = '' def button(e,f): #global value value = e.get() f.destroy() return ...
Bind's user avatar
  • 25
-1 votes
1 answer
148 views

I know what is the purpose of mainloop (or at least i think), also i know that code placed after mainloop can be executed using after(), but why is like that? Why is mainloop blocking it?
dj dj's user avatar
  • 1
1 vote
1 answer
943 views

My understanding of tk.mainloop() was that it would run and handle the events of window related to the first created Tcl interpreter and <widget>.mainloop() would handle the events of the window ...
Delrius Euphoria's user avatar
0 votes
1 answer
629 views

I'm using python to create a class object that controls a Tkinter window. My code looks like this: class MyGui: def __init__(self): self.root = tk.Tk() self.root....
Elliptica's user avatar
  • 4,392
0 votes
1 answer
260 views

I'm trying to do a very basic main loop with SDL2 but the window opens and I can't close it. I've written this code: bool open = true; while (open = true) { SDL_Event event; while (...
John's user avatar
  • 3
0 votes
0 answers
79 views

im working on a project for my networking class which is a 2 clients plaing 4 in a row I have almost everything figured out but i have one major issue, i need to get data from the server and in the ...
harel mael's user avatar
0 votes
1 answer
213 views

I'm making a login system, and I called mainloop in the first window that will be opened upon starting the program. This window is the window which asks whether the user would like to login or ...
vlthi's user avatar
  • 1
3 votes
1 answer
913 views

I also have not a lot of practice with Python and have a fundamental problem of understanding the error: AttributeError: 'NoneType' object has no attribute '_root', which only appears, when I define ...
Lars Lindner's user avatar
1 vote
1 answer
335 views

class StartUp(): def __init__(self): pass def verify(self): username = ("s") password = ("s") usernameEntry = usernameVar.get() ...
sebtheoo's user avatar
  • 164
0 votes
0 answers
87 views

i have again an issue, that i did not figured out why.. All needed code is summarized in this screenshot: Code The part in "pixela_brain.py" where the two print statements are, is the ...
YagmurG's user avatar
  • 33
0 votes
0 answers
128 views

I'm having issues when I import a module that contains tkinter in it. I don't want to paste the code because it's super long and it not my problem here, I've created a module using tkinter and ...
leo_bttf's user avatar
1 vote
1 answer
169 views

from tkinter import * window = Tk() sample = Label(text="some text") sample.pack() sample2 = Label(text="some other text") sample2.pack() sample.mainloop() ...
Kun.tito's user avatar
  • 485
0 votes
0 answers
482 views

I'm a beginner and want to make a fast reading application with tkinter library. The app consists of a Start Button and speed Entry to show the user text in the Message widget. when Start Button press,...
Hoo Loo's user avatar
  • 43
0 votes
2 answers
151 views

I asked a similar question about two years ago when I was trying to emulate LEDs on a Tkinter canvas. The solution then was to use the canvas after() method instead of the sleep() function to ...
johnnym's user avatar
  • 35
0 votes
0 answers
180 views

I have got a program with GUI (Tkinter) where I want to add a login system to. I programed a login window with a several functions in a separate library Login_v1. The program and de login system works ...
Lawrence's user avatar
0 votes
2 answers
400 views

Hi I am writing a simple chess program, unfortunately I have run in some unexpected problems, namely. After I added a list which keeps track of all the figures positions, I cannot close the window ...
Mark's user avatar
  • 131
0 votes
1 answer
414 views

Trying tkinter for first time. The code below has 4 print# statements. Two questions here - 1)- When executing, I expected the of flow of code would be same as print# statements but seems the flow is ...
DS_'s user avatar
  • 257
0 votes
1 answer
245 views

I have programmed a 2600 lines application which worked great when running from the IDE. Now I have created an executable via Pyinstaller and now the GUI does not start. The application starts and ...
Lawrence's user avatar
1 vote
1 answer
291 views

I am looking for the way I can use x value within Tkinter widget. I couldn't find an appropriate answer from the web. Any advice is appreciated. Thanks regarding, confirm, it returns x and print(x) ...
BBiYak's user avatar
  • 29
1 vote
1 answer
4k views

All of the GStreamer samples are initializing GLib main thread through some form of: loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(loop); As far as I understood this main loop is used for all ...
pvv's user avatar
  • 166
0 votes
2 answers
2k views

I have a program where I need to move an image object every time the mainloop() loops. I haven't tried doing much, mostly because I don't know where to start. I made a dummy version of my project that ...
Spell ICUP's user avatar
0 votes
1 answer
812 views

I added -fPCI to the QEMU source file compilation option and added -shared to the final link command, so that QEMU has become a shared library that can be dynamically loaded. I started trying to ...
chmodJack's user avatar
-1 votes
2 answers
381 views

I am trying to implement a counter in tkinter. I expect it to +1 whenever I click whichever button. However, the counter value always remains the same. Here is my sample code: import tkinter as tk ...
user48867's user avatar
  • 141
0 votes
1 answer
63 views

So I'm doing a project in school and I'm making a game with Tkinter (I know I could have used PyGame but We learned only Tkinter in school....) My game using sockets as well and as you might know once ...
Adam 's user avatar
  • 11
2 votes
0 answers
75 views

I want to query a widget's size after changing its contents. Here's a demonstration: import tkinter as tk win = tk.Tk() label = tk.Label(win) label.pack() def callback1(): label['text'] = '...
Aran-Fey's user avatar
  • 44.1k
0 votes
1 answer
69 views

I am quite new to Python and currently learning how to create basic windows using Tkinter. The Python documentation suggests using the following code (simplified): from tkinter import * class ...
plainmath's user avatar