{"id":17083510,"url":"https://github.com/alejandroautalan/pygubu-designer","last_synced_at":"2025-05-14T04:10:37.504Z","repository":{"id":37592218,"uuid":"253557813","full_name":"alejandroautalan/pygubu-designer","owner":"alejandroautalan","description":"A simple GUI designer for the python tkinter module","archived":false,"fork":false,"pushed_at":"2025-05-06T03:15:45.000Z","size":3652,"stargazers_count":950,"open_issues_count":21,"forks_count":109,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-06T04:25:07.420Z","etag":null,"topics":["python-gui-development","python-gui-programming","tkinter","tkinter-graphic-interface","tkinter-gui","tkinter-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandroautalan.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://paypal.me/AlejandroA36"]}},"created_at":"2020-04-06T16:41:01.000Z","updated_at":"2025-05-06T03:15:49.000Z","dependencies_parsed_at":"2024-05-22T22:44:19.833Z","dependency_job_id":"efe0fb9c-6209-4cb1-9aa0-01b459a51b46","html_url":"https://github.com/alejandroautalan/pygubu-designer","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandroautalan%2Fpygubu-designer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandroautalan%2Fpygubu-designer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandroautalan%2Fpygubu-designer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandroautalan%2Fpygubu-designer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandroautalan","download_url":"https://codeload.github.com/alejandroautalan/pygubu-designer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254070125,"owners_count":22009560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-gui-development","python-gui-programming","tkinter","tkinter-graphic-interface","tkinter-gui","tkinter-python"],"created_at":"2024-10-14T13:02:11.501Z","updated_at":"2025-05-14T04:10:32.492Z","avatar_url":"https://github.com/alejandroautalan.png","language":"Python","funding_links":["https://paypal.me/AlejandroA36"],"categories":["🐍 Python Ecosystem (Python 学习与资源)","GUI Designers"],"sub_categories":[],"readme":"\n[Leer en Español](Documentation/README/es.md). More translations [here](Documentation/README)\n\nWelcome to Pygubu!\n============================================\n\n`Pygubu` is a [RAD tool](https://en.wikipedia.org/wiki/Rapid_application_development) to enable _quick_ and _easy development of user interfaces_ for the Python's `tkinter` module.\n\nThe user interfaces designed are saved as [XML](https://en.wikipedia.org/wiki/XML) files, and, by using the _pygubu builder_, these can be loaded by applications dynamically as needed.\n\nPygubu is inspired by [Glade](https://gitlab.gnome.org/GNOME/glade).\n\nInstallation\n============\n\nThe latest version of pygubu requires Python \u003e= 3.8\n\nYou can install pygubu-designer using:\n\n### pip\n\n```\npip install pygubu-designer\n```\n### Arch Linux ([AUR](https://aur.archlinux.org/packages/pygubu-designer))\n```\nyay pygubu-designer\n```\n### Notes for Windows Users:\n\nIf your Python installation directory contains spaces (e.g., `C:\\Program Files\\Python312`), you may encounter errors. Use one of the following solutions:\n\n1. Use quotation marks when running commands:\n\n```\n\n\"C:\\Program Files\\Python312\\Scripts\\pygubu-designer.exe\"\n```\n\n2. Add Python to your system's PATH:\n- Open **System Properties** \u003e **Environment Variables**.\n- Under **System Variables**, select `Path` \u003e **Edit**.\n- Add the path to your Python installation (e.g., `C:\\Program Files\\Python312`).\n\n3. Use the short pathname format for directories with spaces:\n\n\n```\n\nC:\\PROGRA~1\\Python312\\Scripts\\pygubu-designer.exe\n```\n\nScreenshot\n==========\n\n\u003cimg src=\"pygubu-designer.png\" alt=\"pygubu-desinger.png\"\u003e\n\n\nUsage\n=====\n\nType on the terminal one of the following commands depending on your system.\n\n### Unix-like systems\n\n```\npygubu-designer\n```\n\n### Windows\n\n```\nC:\\Python3\\Scripts\\pygubu-designer.exe\n```\n\nWhere `C:\\Python3` is the path to **your** Python installation directory.\n\nNow, you can start creating your tkinter application using the widgets that you\nfind in the top panel called `Widget Palette`.\n\nAfter you finished creating your _UI definition_, save it to a `.ui` file by\ngoing to the top menu `File \u003e Save`.\n\nThe following is a UI definition example called\n[helloworld.ui](examples/helloworld/helloworld.ui) created using pygubu:\n\n\n```xml\n\u003c?xml version='1.0' encoding='utf-8'?\u003e\n\u003cinterface version=\"1.2\"\u003e\n  \u003cobject class=\"tk.Toplevel\" id=\"mainwindow\"\u003e\n    \u003cproperty name=\"height\"\u003e200\u003c/property\u003e\n    \u003cproperty name=\"resizable\"\u003eboth\u003c/property\u003e\n    \u003cproperty name=\"title\" translatable=\"yes\"\u003eHello World App\u003c/property\u003e\n    \u003cproperty name=\"width\"\u003e200\u003c/property\u003e\n    \u003cchild\u003e\n      \u003cobject class=\"ttk.Frame\" id=\"mainframe\"\u003e\n        \u003cproperty name=\"height\"\u003e200\u003c/property\u003e\n        \u003cproperty name=\"padding\"\u003e20\u003c/property\u003e\n        \u003cproperty name=\"width\"\u003e200\u003c/property\u003e\n        \u003clayout manager=\"pack\"\u003e\n          \u003cproperty name=\"expand\"\u003etrue\u003c/property\u003e\n          \u003cproperty name=\"side\"\u003etop\u003c/property\u003e\n        \u003c/layout\u003e\n        \u003cchild\u003e\n          \u003cobject class=\"ttk.Label\" id=\"label1\"\u003e\n            \u003cproperty name=\"anchor\"\u003ecenter\u003c/property\u003e\n            \u003cproperty name=\"font\"\u003eHelvetica 26\u003c/property\u003e\n            \u003cproperty name=\"foreground\"\u003e#0000b8\u003c/property\u003e\n            \u003cproperty name=\"text\" translatable=\"yes\"\u003eHello World !\u003c/property\u003e\n            \u003clayout manager=\"pack\"\u003e\n              \u003cproperty name=\"side\"\u003etop\u003c/property\u003e\n            \u003c/layout\u003e\n          \u003c/object\u003e\n        \u003c/child\u003e\n      \u003c/object\u003e\n    \u003c/child\u003e\n  \u003c/object\u003e\n\u003c/interface\u003e\n```\n\nThen, you should create your _application script_ as shown below\n([helloworld.py](examples/helloworld/helloworld.py)):\n\n```python\n# helloworld.py\nimport pathlib\nimport tkinter as tk\nimport tkinter.ttk as ttk\nimport pygubu\n\nPROJECT_PATH = pathlib.Path(__file__).parent\nPROJECT_UI = PROJECT_PATH / \"helloworld.ui\"\n\n\nclass HelloworldApp:\n    def __init__(self, master=None):\n        # 1: Create a builder and setup resources path (if you have images)\n        self.builder = builder = pygubu.Builder()\n        builder.add_resource_path(PROJECT_PATH)\n\n        # 2: Load an ui file\n        builder.add_from_file(PROJECT_UI)\n\n        # 3: Create the mainwindow\n        self.mainwindow = builder.get_object('mainwindow', master)\n\n        # 4: Connect callbacks\n        builder.connect_callbacks(self)\n\n    def run(self):\n        self.mainwindow.mainloop()\n\n\nif __name__ == '__main__':\n    app = HelloworldApp()\n    app.run()\n\n```\n\nNote that instead of `helloworld.ui` in the following line:\n\n```python\nPROJECT_UI = PROJECT_PATH / \"helloworld.ui\"\n```\n\nYou should insert the _filename_ (or path) of your just saved UI definition.\n\n\nNote also that instead of `'mainwindow'` in the following line:\n\n```python\nself.mainwindow = builder.get_object('mainwindow', master)\n```\n\nYou should have the name of your _main widget_ (the parent of all widgets),\notherwise you will get an error similar to the following:\n\n    Exception: Widget not defined.\n\nSee [this](https://github.com/alejandroautalan/pygubu/issues/40) issue for\nmore information.\n\n\nDocumentation\n=============\n\nVisit the [wiki](https://github.com/alejandroautalan/pygubu-designer/wiki) for\nmore documentation.\n\n\nThe following are some good tkinter (and tk) references:\n\n- [TkDocs](http://www.tkdocs.com)\n- [Graphical User Interfaces with Tk](https://docs.python.org/3/library/tk.html)\n- [Tkinter 8.5 reference: a GUI for Python](https://tkdocs.com/shipman)\n- [An Introduction to Tkinter](http://effbot.org/tkinterbook) [(archive)](http://web.archive.org/web/20200504141939/http://www.effbot.org/tkinterbook)\n- [Tcl/Tk 8.5 Manual](http://www.tcl.tk/man/tcl8.5/)\n\n\nYou can also see the [examples](examples) directory or watch [this introductory video tutorial](http://youtu.be/wuzV9P8geDg).\n\n\nHistory\n=======\n\nSee the list of changes [here](HISTORY.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandroautalan%2Fpygubu-designer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandroautalan%2Fpygubu-designer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandroautalan%2Fpygubu-designer/lists"}