How to use the easygui.boxes.derived_boxes.msgbox function in easygui

To help you get started, we’ve selected a few easygui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robertlugg / easygui / easygui / boxes / alt_text_box.py View on Github external
def to_string(something):
    if isinstance(something, ut.basestring):
        return something
    try:
        text = "".join(something)  # convert a list or a tuple to a string
    except:
        db.msgbox(
            "Exception when trying to convert {} to text in self.textArea"
            .format(type(something)))
        sys.exit(16)
    return text
github robertlugg / easygui / easygui / boxes / alt_text_box.py View on Github external
title = "Demo of textbox: Classic box"

    gnexp = "This is a demo of the classic textbox call, \
you can see it closes when ok is pressed.\n\n"

    msg = "INSERT A TEXT WITH MORE THAN TWO PARAGRAPHS"

    text_snippet = "Insert your text here\n"

    reply = textbox(gnexp + msg, title, text_snippet, None)

    if reply.count("\n") >= 2:
        db.msgbox(u"You did it right!")
    else:
        db.msgbox(u"You did it wrong!")
github robertlugg / easygui / easygui / boxes / alt_text_box.py View on Github external
def demo_1():

    title = "Demo of textbox: Classic box"

    gnexp = "This is a demo of the classic textbox call, \
you can see it closes when ok is pressed.\n\n"

    msg = "INSERT A TEXT WITH MORE THAN TWO PARAGRAPHS"

    text_snippet = "Insert your text here\n"

    reply = textbox(gnexp + msg, title, text_snippet, None)

    if reply.count("\n") >= 2:
        db.msgbox(u"You did it right!")
    else:
        db.msgbox(u"You did it wrong!")
github draperjames / qtpandas / qtpandas / excepthook.py View on Github external
sections = ['\n', separator, timeString, separator,
                errmsg, separator, tbinfo]
    try:
        msg = '\n'.join(sections)

    except TypeError as e:
        # Remove all things not string.
        sections = [item for item in sections if type(item) == str]
        msg = '\n'.join(sections)

    try:
        f = codecs.open(logFile, "a+", encoding='utf-8')
        f.write(msg)
        f.close()
    except IOError as e:
        msgbox("unable to write to {0}".format(logFile), "Writing error")

    # always show an error message
    try:
        if not _isQAppRunning():
            app = QtGui.QApplication([])
        _showMessageBox(str(notice) + str(msg))
    except:
        msgbox(str(notice) + str(msg), "Error")
github robertlugg / easygui / easygui / boxes / demo.py View on Github external
def demo_ynbox():
    title = "Demo of ynbox"
    msg = "Were you expecting the Spanish Inquisition?"
    reply = ynbox(msg, title)
    print("Reply was: {!r}".format(reply))
    if reply:
        msgbox("NOBODY expects the Spanish Inquisition!", "Wrong!")
    return reply
github robertlugg / easygui / easygui / boxes / demo.py View on Github external
def demo_msgbox():
    reply = msgbox("short msg", "This is a long title")
    print("Reply was: {!r}".format(reply))
    return reply
github draperjames / qtpandas / qtpandas / excepthook.py View on Github external
msg = '\n'.join(sections)

    try:
        f = codecs.open(logFile, "a+", encoding='utf-8')
        f.write(msg)
        f.close()
    except IOError as e:
        msgbox("unable to write to {0}".format(logFile), "Writing error")

    # always show an error message
    try:
        if not _isQAppRunning():
            app = QtGui.QApplication([])
        _showMessageBox(str(notice) + str(msg))
    except:
        msgbox(str(notice) + str(msg), "Error")

easygui

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

63 / 100
Full package analysis