'my program window is not responding .why idk?
import psutil
import time
from tkinter import *
def eventc(event):
while True :
print(psutil.cpu_stats())
time.sleep(2)
def closewin(event):
exit(0)
def myevent(event):
print('okayy')
window=Tk()
#button for stats
btn=Button(window, text="click me for cpu stats", fg='blue')
btn.place(x=80, y=100)
btn.bind('<Button>',eventc)
#btn for closing the window
winclose=Button(window, text="close window", fg='blue')
winclose.place(x=95, y=0)
winclose.bind('<Button>',closewin)
#for window
window.title('my \'so called first app\'')
window.geometry("300x200+10+10")
window.mainloop()
When I click get cpu stats is gives me stats but the window will not respond after that. and after forcefully ending the window it give me this exit code:Process finished with exit code -805306369 (0xCFFFFFFF) can you help me why
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
