Question: How I can change the output size in insert import tkinter as tk import subprocess def run_command(command): process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, error
How I can change the output size in insert
import tkinter as tk import subprocess
def run_command(command): process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, error = process.communicate() if error: return error.decode('utf-8') else: return output.decode('utf-8')
def on_click(): output_text = run_command(r"C:/Users/20his/Desktop/Lean Projects/RS Sehaty/RecSys/DeepLearning1/HybridTest.py") output_display.configure(state='normal') output_display.delete('1.0', tk.END)
##here output_display.insert(tk.END, output_text)
output_display.configure(state='disabled')
root = tk.Tk() root.title("My Health RS")
button = tk.Button(root, text="Run the Model", command=on_click,height= 5, width=20, font= ('Helvetica 20 bold italic')) button.pack()
output_label = tk.Label(root, text="Output:", font= ('Helvetica 20 bold italic')) output_label.pack()
output_display = tk.Text(root, state='disabled', height=1920, width=1080) output_display.pack()
root.mainloop()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
