Updating variables for in-class functions after receiving user feedback

I’m trying to update the variable ‘operation’ from ‘ ‘ to the option the user selects. However, until it loops through, the first question always uses a random operation. I’ve tried to revise my code as much as possible, and isolate the crucial code. Because of this, you’ll probably need to start the programme more… Read More Updating variables for in-class functions after receiving user feedback

Instead of updating the tkinter gui, it adds a new one to the table

I am developing an application. The application needs to adjust itself every 1 second as new data comes in. but the application creates a new image downwards instead of editing the image. from tkinter import * from random import randint import time root = Tk() lab = Label(root) lab.pack() def main(): y = randint(0,1000) root.after(1000,… Read More Instead of updating the tkinter gui, it adds a new one to the table

How to continue programm after closing tkinter-window in python?

I got a problem with two tkinter windows which I simplified as follows: import tkinter as tk def function_2(): # creates Window 2 root2 = tk.Tk() # some buttons targeting other functions root2.mainloop() print(1) # just a placeholder for some other code def function_1(): # creates Window 1 root = tk.Tk() funtcion_2() root.mainloop() function_1() I… Read More How to continue programm after closing tkinter-window in python?

Padding between widgets that was set by tkinter's .grid() method, even though I didn't set it

I tried place widgets by .grid() method, and when I place RadioButtons on different row – I saw that there padding on different row, also between them. This is what I talking about (I point paddings that I noticed): And there my code: import tkinter as tk from string import hexdigits from tkinter import ttk… Read More Padding between widgets that was set by tkinter's .grid() method, even though I didn't set it

Python tkinter button command dont runing right parameter

i want to make a 3×3 button interface. I tryed make this on tkinter but its didnt working right. there is my main.py code: frame = tk.Frame(root, bg=’white’) frame.place(relx=0.5, rely=0.5, anchor=’center’) buttons = [] for row in range(3): row_list = [] for col in range(3): button = tk.Button( master=frame, text="", font=(‘Calibri’, 36, "bold"), fg="black", width=5,… Read More Python tkinter button command dont runing right parameter