krop.py
unknown
python
6 months ago
841 B
5
Indexable
import tkinter from tkinter import Label from tkinter import Entry from tkinter import Button import threading import time import subprocess root = tkinter.Tk() root.title("Krop") # Login object class Login(): def __init__(self): Label(root, text="DisplayName").grid(row=0) Label(root, text="Token").grid(row=1) Button(root, text="OK", width=25, command=self.login).grid(row=2) self.display_name = Entry(root) self.token = Entry(root) self.display_name.grid(row=0, column=1) self.token.grid(row=1, column=1) def login(self): _disp = self.display_name.get() _token = self.token.get() print("got details") result = subprocess.run(["python", "backend.py"], capture_output=True, text=True, check=True) print(result) if __name__ == "__main__": Login() root.mainloop()
Editor is loading...
Leave a Comment