May-02-2017, 05:57 PM
Okay, thanks. I'll take note of that. It's still not running from the command line. The latest attempt went as follows:
As for the message box commands, I wonder if for any Linux version, I have to code in something that tells the message box to display forward. Those message boxes are running, but the first one is always back behind. I did a little more coding, adding more message boxes just for practice:
Maybe there's some way to tell a message box "run in the foreground"?
thomas@thomas-HP-Compaq-6200-Pro-SFF-PC:~/Documents/python_work/GUIs/thenewboston$ python buckymessagebox.py Traceback (most recent call last): File "buckymessagebox.py", line 1, in <module> from tkinter import * ImportError: No module named tkinter thomas@thomas-HP-Compaq-6200-Pro-SFF-PC:~/Documents/python_work/GUIs/thenewboston$I wonder if tkinter has to be on whatever the Linux equivalent of the path is. I remember having to put things on the path back in my MS DOS days.
As for the message box commands, I wonder if for any Linux version, I have to code in something that tells the message box to display forward. Those message boxes are running, but the first one is always back behind. I did a little more coding, adding more message boxes just for practice:
from tkinter import * import tkinter.messagebox ### Pull in ability to make message boxes root = Tk() tkinter.messagebox.showinfo('Window Title', 'Monkeys can live up to 300 years.') answer = tkinter.messagebox.askquestion('Question 1', 'Do you like silly faces?') if answer == 'yes': tkinter.messagebox.showinfo('Really', 'Here ya go 8===D~ ') # print(' 8===D~ ') elif answer == 'no': tkinter.messagebox.showinfo('Really', 'You sure are boring') newanswer = tkinter.messagebox.askquestion('Question 2', 'Are you a goofball?') if newanswer == 'yes': tkinter.messagebox.showinfo('Really', 'That is awesome. Enjoy') elif newanswer == 'no': tkinter.messagebox.showinfo('Really', 'Yawn, why not live a little?') else: tkinter.messagebox.showinfo('Really', 'Yeah, whatever.') root.mainloop()The first one, the one that reads "Monkeys can live up to 300 years" is always back behind. I have to find it in the Kubuntu task bar and click on it to bring it forward. Once that is done, all the others are then at the front where they should be. I can't let that behavior be in the final version of an application. If the user ran it, he might not realize that there was a message box back behind that was asking a question.
Maybe there's some way to tell a message box "run in the foreground"?