Python Message Box Without huge library dependency

前端 未结 6 777
死守一世寂寞
死守一世寂寞 2020-12-13 04:00

Is there a messagebox class where I can just display a simple message box without a huge GUI library or any library upon program success or failure. (My script only does 1 t

6条回答
  •  长情又很酷
    2020-12-13 04:42

    The PyMsgBox module uses Python's tkinter, so it doesn't depend on any other third-party modules. You can install it with pip install pymsgbox.

    The function names are similar to JavaScript's alert(), confirm(), and prompt() functions:

    >>> import pymsgbox
    >>> pymsgbox.alert('This is an alert!')
    >>> user_response = pymsgbox('What is your favorite color?')
    

提交回复
热议问题