How can I create a simple message box in Python?

后端 未结 17 1385
心在旅途
心在旅途 2020-11-30 16:44

I\'m looking for the same effect as alert() in JavaScript.

I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit

17条回答
  •  忘掉有多难
    2020-11-30 17:26

    The code you presented is fine! You just need to explicitly create the "other window in the background" and hide it, with this code:

    import Tkinter
    window = Tkinter.Tk()
    window.wm_withdraw()
    

    Right before your messagebox.

提交回复
热议问题