Nov-08-2022, 08:25 PM
(This post was last modified: Nov-08-2022, 08:25 PM by menator01.
Edit Reason: Works without doing root.mainloop() on my box
)
Here is an example of your code modified
from tkinter import messagebox def func(): while True: data = input('enter a, b, or c. To quit enter q\n>> ') if data == 'a': data = 5 elif data == 'b': data = 10 elif data == 'c': data = 15 elif data == 'q': print('Goodbye!') break else: messagebox.showerror(title='Error', message='Wrong Input') data = 0 print(f'data was set to {data}\n') func()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts