{"id":2490,"library":"easygui","title":"EasyGUI","description":"EasyGUI is a module for very simple, very easy GUI programming in Python. It differentiates from other GUI libraries by not being event-driven; instead, all GUI interactions are invoked by simple blocking function calls. The current version is 0.98.3, released on April 1, 2022, with an infrequent release cadence.","status":"maintenance","version":"0.98.3","language":"en","source_language":"en","source_url":"https://github.com/robertlugg/easygui","tags":["GUI","simple GUI","dialogs","no event loop","tkinter wrapper"],"install":[{"cmd":"pip install easygui","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"EasyGUI is built on Tkinter. On Linux, Tkinter (python-tk or python3-tk) may need to be installed separately via the system package manager.","package":"Tkinter","optional":false}],"imports":[{"note":"Using an alias (e.g., `eg`) is recommended to keep the namespace clean and minimize typing. `import easygui` is also correct but requires `easygui.func()` calls.","symbol":"easygui","correct":"import easygui as eg"},{"note":"While functional, 'import *' is generally considered bad Python practice as it pollutes the global namespace with all EasyGUI functions, potentially leading to name clashes.","wrong":"from easygui import *","symbol":"*"}],"quickstart":{"code":"import easygui as eg\nimport sys\n\n# Display a simple message box\neg.msgbox(\"Hello from EasyGUI!\", \"Welcome\")\n\n# Ask a yes/no question\nif eg.ynbox(\"Shall I continue?\", \"Question\"): \n    # If user chose Yes, ask for input\n    name = eg.enterbox(\"What is your name?\", \"Name Input\")\n    if name:\n        eg.msgbox(f\"Hello, {name}!\", \"Greeting\")\n    else:\n        eg.msgbox(\"You cancelled the name input.\", \"Cancelled\")\nelse:\n    eg.msgbox(\"You chose to exit.\", \"Exit\")\n    sys.exit(0)\n","lang":"python","description":"This quickstart demonstrates basic EasyGUI interactions: displaying a message box, asking a yes/no question, and getting text input from the user. EasyGUI functions are blocking, meaning the program waits for user interaction before proceeding. Remember to run EasyGUI scripts outside of IDLE for best compatibility."},"warnings":[{"fix":"Always run EasyGUI scripts directly from a terminal or another IDE (e.g., VS Code, PyCharm) rather than from IDLE.","message":"EasyGUI programs often conflict with the IDLE IDE (Python's default editor) because both EasyGUI (via Tkinter) and IDLE use their own event loops, leading to unpredictable behavior or freezing.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to EasyGUI 0.98.1 or any later version (e.g., `pip install --upgrade easygui`). This issue was resolved in 0.98.1.","message":"EasyGUI 0.98.0 introduced a syntax error (`except Exception, e:`) that was incompatible with Python 3.5+ due to changes in exception handling syntax.","severity":"breaking","affected_versions":"0.98.0 when used with Python 3.5 or newer"},{"fix":"Design your application flow around sequential, blocking user interactions. If you require complex, responsive, or multi-threaded GUIs, consider a full-fledged event-driven framework like Tkinter, PyQt, or Kivy.","message":"EasyGUI is NOT event-driven. Its functions are blocking calls; the program execution pauses until the user interacts with and closes the displayed dialog box. This is fundamentally different from traditional GUI frameworks.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always extract values from the returned list and explicitly convert them to the appropriate data type (e.g., `int()`, `float()`) before performing numeric operations. For example: `value = int(multenterbox(...)[0])`.","message":"The `multenterbox()` function (and similar input boxes) returns user input as a list of strings, even for single fields or intended numeric inputs. Attempting to perform arithmetic directly on these string elements will result in `TypeError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure that any image files you intend to display with EasyGUI functions are in the GIF format. Convert other formats if necessary.","message":"When displaying images in functions like `buttonbox()`, EasyGUI only natively supports GIF (.gif) file format.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}