I use tkinter to do GUI. When use messagebox, that can not see title and showerror icon is a file, just like that:
This is my env:
And this is my code
import tkinter
from tkinter import messagebox
window = tkinter.Tk()
window.withdraw()
messagebox.showerror(title="error title", message="for test message")
window.destroy()
I want to see title and error icon, just like windows system. How can I do to fix this progrem, thanks.
If there are features that are different for different operating systems, then you can determine the operating system like this:
import sys
p = sys.platform
if p == "linux" or p == "linux2":
# linux
print('using linux')
elif p == "darwin":
# OS X
print('using mac')
elif p == "win32":
# Windows...
print('using windows')
Alternatively the mac settings (so not tkinter
). How are the error messages currently displayed on the pc as one would expect tkinter
to be consistent with this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.