tkinter

Python: Tkinter pausing a while loop

孤街浪徒 提交于 2021-02-08 10:52:09
问题 So i'm trying to create a program that displays the cpu usage of your computer in real time. I wanted to use tkinter to add some buttons to the program. I decided to add a stop button that closes the program and a pause button that stops the cpu usage from updating. I was able to create the stop button but when I started the pause button I realized that I was unable to pause the while loop I using. Does anyone know what i'm doing wrong? from tkinter import * import psutil from time import

Use Tkinter to Open file, run script and export file

百般思念 提交于 2021-02-08 10:50:48
问题 I would like to create a pyton script that takes an excel file (provided by the user), run a script, and save this excel file (with a file name provided by the user). I would like to implement some buttons using Tkinter to enable non-programmers to easily use my algorithm. I tried to create a ''load data'' and ''display data'' button (I took a code online) that both work. However I didn't manage to run the script on the database imported (as I don't know how to access it) I didnt manage to

Use Tkinter to Open file, run script and export file

纵饮孤独 提交于 2021-02-08 10:50:46
问题 I would like to create a pyton script that takes an excel file (provided by the user), run a script, and save this excel file (with a file name provided by the user). I would like to implement some buttons using Tkinter to enable non-programmers to easily use my algorithm. I tried to create a ''load data'' and ''display data'' button (I took a code online) that both work. However I didn't manage to run the script on the database imported (as I don't know how to access it) I didnt manage to

How to add 2 scrollbars with tkinter in python 3.4?

女生的网名这么多〃 提交于 2021-02-08 10:33:02
问题 I have the following code: from win32com.client import Dispatch from tkinter import * from tkinter import ttk import tkinter class applicazione: def __init__(self, root): self.root = root self.root.title('Controllo dati per fatturazione elettronica - Manticle - Smith & Nephew Italia') ttk.Frame(self.root, width=300, height=250).pack() #### label list self.titoli = list() self.titoli_BFT = ["Num_Doc", "Cod_Art", "Unita Misura", "Tot_Prod", "Quant_Prod", "Perc_IVA_Prod", "Tot_IVA_Prod", "Linea

Tkinter, Popen, and threads

自闭症网瘾萝莉.ら 提交于 2021-02-08 10:27:25
问题 I have a need from a Tkinter GUI to be able to start a long-running Linux script but at the same time I want to be able to have a stop-button enable so I can stop the process. Neither Tkinter nor popen are threadsafe. I thought of simply either placing the popen function in a thread or possibly just enabling a button in a thread. I am currently using Red Hat Linux 5.9 which uses Python 2.4.3, but I have later versions available online that I could use. In the program, below note that I

Clearing Placed Labels in Tkinter

风流意气都作罢 提交于 2021-02-08 10:25:55
问题 So I have a currency which is increasing (that system is working fine). The first part updates the label every 100 ms. I have another button which triggers the second function which is supposed to clear the labels from the first. It sets home_status equal to 0 which should in theory run Money.place_forget() to clear the code. I have tested each part individually and it works but when I put the clears inside the elif statement it doesn't. It does not give me any errors, it just simply doesn't

I can't install Tkinter or tkinter. I tried every code and reinstall TCL/TK too. But still got an error

血红的双手。 提交于 2021-02-08 10:24:40
问题 I try every solution on stackover and many other sites. But it's still giving same faults. I even couldn't install it. C:\Users\***\Google Drive\Python>pip install tkinter Collecting tkinter Could not find a version that satisfies the requirement tkinter (from versions: ) No matching distribution found for tkinter C:\Users\***\Google Drive\Python>pip install Tkinter Collecting Tkinter Could not find a version that satisfies the requirement Tkinter (from versions: ) No matching distribution

I can't install Tkinter or tkinter. I tried every code and reinstall TCL/TK too. But still got an error

萝らか妹 提交于 2021-02-08 10:23:15
问题 I try every solution on stackover and many other sites. But it's still giving same faults. I even couldn't install it. C:\Users\***\Google Drive\Python>pip install tkinter Collecting tkinter Could not find a version that satisfies the requirement tkinter (from versions: ) No matching distribution found for tkinter C:\Users\***\Google Drive\Python>pip install Tkinter Collecting Tkinter Could not find a version that satisfies the requirement Tkinter (from versions: ) No matching distribution

How display multi videos with threading using tkinter in python?

半世苍凉 提交于 2021-02-08 10:13:04
问题 I recently created a program which displays multi video sources from 2 ip cameras with opencv. but I decided to create UI for my application, and now, It's not so clear for me that how I can implement it using multi threading method. here is the code I used to display only one camera in TKinter GUI: import tkinter import cv2 import PIL.Image, PIL.ImageTk import time class App: def __init__(self, window, window_title, video_source=0): self.window = window self.window.title(window_title) self

How to pass data between top levels in tkinter

北慕城南 提交于 2021-02-08 10:12:36
问题 I am totally new to tkinter. I am trying to pass data between two windows. There is a button on root window. button press will open a top level. There are two entry fields and a submit button in on toplevel window. user can enter two number and submit. What i am trying to achieve is, pressing submit button should close the top level and result (sum) should be shown in the root window. How to pass entry field data to root window? from tkinter import * root= Tk() root.geometry('600x400') sum