Name | pygubu-designer JSON |
Version |
0.38
JSON |
| download |
home_page | |
Summary | A simple GUI designer for the python tkinter module |
upload_time | 2024-02-11 06:11:40 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.6 |
license | GPL-3 |
keywords |
gui
tkinter
designer
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[Leer en EspaƱol](LEEME.md)
Welcome to Pygubu!
============================================
`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.
The 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.
Pygubu is inspired by [Glade](https://glade.gnome.org).
Installation
============
The latest version of pygubu requires Python >= 3.6
You can install pygubu-designer using:
### pip
```
pip install pygubu-designer
```
### Arch Linux ([AUR](https://aur.archlinux.org/packages/pygubu-designer))
```
yay pygubu-designer
```
Screenshot
==========
<img src="pygubu-designer.png" alt="pygubu-desinger.png">
Usage
=====
Type on the terminal one of the following commands depending on your system.
### Unix-like systems
```
pygubu-designer
```
### Windows
```
C:\Python3\Scripts\pygubu-designer.exe
```
Where `C:\Python3` is the path to **your** Python installation directory.
Now, you can start creating your tkinter application using the widgets that you
find in the top panel called `Widget Palette`.
After you finished creating your _UI definition_, save it to a `.ui` file by
going to the top menu `File > Save`.
The following is a UI definition example called
[helloworld.ui](examples/helloworld/helloworld.ui) created using pygubu:
```xml
<?xml version='1.0' encoding='utf-8'?>
<interface version="1.2">
<object class="tk.Toplevel" id="mainwindow">
<property name="height">200</property>
<property name="resizable">both</property>
<property name="title" translatable="yes">Hello World App</property>
<property name="width">200</property>
<child>
<object class="ttk.Frame" id="mainframe">
<property name="height">200</property>
<property name="padding">20</property>
<property name="width">200</property>
<layout manager="pack">
<property name="expand">true</property>
<property name="side">top</property>
</layout>
<child>
<object class="ttk.Label" id="label1">
<property name="anchor">center</property>
<property name="font">Helvetica 26</property>
<property name="foreground">#0000b8</property>
<property name="text" translatable="yes">Hello World !</property>
<layout manager="pack">
<property name="side">top</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</interface>
```
Then, you should create your _application script_ as shown below
([helloworld.py](examples/helloworld/helloworld.py)):
```python
# helloworld.py
import pathlib
import tkinter as tk
import tkinter.ttk as ttk
import pygubu
PROJECT_PATH = pathlib.Path(__file__).parent
PROJECT_UI = PROJECT_PATH / "helloworld.ui"
class HelloworldApp:
def __init__(self, master=None):
# 1: Create a builder and setup resources path (if you have images)
self.builder = builder = pygubu.Builder()
builder.add_resource_path(PROJECT_PATH)
# 2: Load an ui file
builder.add_from_file(PROJECT_UI)
# 3: Create the mainwindow
self.mainwindow = builder.get_object('mainwindow', master)
# 4: Connect callbacks
builder.connect_callbacks(self)
def run(self):
self.mainwindow.mainloop()
if __name__ == '__main__':
app = HelloworldApp()
app.run()
```
Note that instead of `helloworld.ui` in the following line:
```python
PROJECT_UI = PROJECT_PATH / "helloworld.ui"
```
You should insert the _filename_ (or path) of your just saved UI definition.
Note also that instead of `'mainwindow'` in the following line:
```python
self.mainwindow = builder.get_object('mainwindow', master)
```
You should have the name of your _main widget_ (the parent of all widgets),
otherwise you will get an error similar to the following:
Exception: Widget not defined.
See [this](https://github.com/alejandroautalan/pygubu/issues/40) issue for
more information.
Documentation
=============
Visit the [wiki](https://github.com/alejandroautalan/pygubu-designer/wiki) for
more documentation.
The following are some good tkinter (and tk) references:
- [TkDocs](http://www.tkdocs.com)
- [Graphical User Interfaces with Tk](https://docs.python.org/3/library/tk.html)
- [Tkinter 8.5 reference: a GUI for Python](https://tkdocs.com/shipman)
- [An Introduction to Tkinter](http://effbot.org/tkinterbook) [(archive)](http://web.archive.org/web/20200504141939/http://www.effbot.org/tkinterbook)
- [Tcl/Tk 8.5 Manual](http://www.tcl.tk/man/tcl8.5/)
You can also see the [examples](examples) directory or watch [this introductory video tutorial](http://youtu.be/wuzV9P8geDg).
History
=======
See the list of changes [here](HISTORY.md).
Raw data
{
"_id": null,
"home_page": "",
"name": "pygubu-designer",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "gui,tkinter,designer",
"author": "",
"author_email": "Alejandro Autalan <alejandroautalan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/53/f2/aa962a3856c884b3aaaf462ffdb2920a2946ad0e1b7d7055db9d3d2cc31e/pygubu-designer-0.38.tar.gz",
"platform": null,
"description": "\n[Leer en Espa\u00f1ol](LEEME.md)\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://glade.gnome.org).\n\nInstallation\n============\n\nThe latest version of pygubu requires Python >= 3.6\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\nScreenshot\n==========\n\n<img src=\"pygubu-designer.png\" alt=\"pygubu-desinger.png\">\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 > 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<?xml version='1.0' encoding='utf-8'?>\n<interface version=\"1.2\">\n <object class=\"tk.Toplevel\" id=\"mainwindow\">\n <property name=\"height\">200</property>\n <property name=\"resizable\">both</property>\n <property name=\"title\" translatable=\"yes\">Hello World App</property>\n <property name=\"width\">200</property>\n <child>\n <object class=\"ttk.Frame\" id=\"mainframe\">\n <property name=\"height\">200</property>\n <property name=\"padding\">20</property>\n <property name=\"width\">200</property>\n <layout manager=\"pack\">\n <property name=\"expand\">true</property>\n <property name=\"side\">top</property>\n </layout>\n <child>\n <object class=\"ttk.Label\" id=\"label1\">\n <property name=\"anchor\">center</property>\n <property name=\"font\">Helvetica 26</property>\n <property name=\"foreground\">#0000b8</property>\n <property name=\"text\" translatable=\"yes\">Hello World !</property>\n <layout manager=\"pack\">\n <property name=\"side\">top</property>\n </layout>\n </object>\n </child>\n </object>\n </child>\n </object>\n</interface>\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",
"bugtrack_url": null,
"license": "GPL-3",
"summary": "A simple GUI designer for the python tkinter module",
"version": "0.38",
"project_urls": {
"Documentation": "https://github.com/alejandroautalan/pygubu-designer#readme",
"Issues": "https://github.com/alejandroautalan/pygubu-designer/issues",
"Source": "https://github.com/alejandroautalan/pygubu-designer"
},
"split_keywords": [
"gui",
"tkinter",
"designer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cc605805cbf8cfe49f3411a27722a2a8fee64ea77243b5095e227efdf66aca92",
"md5": "66fc308b96cc987ba78075019245e91f",
"sha256": "9876fb8eda6d8815e01f8a8110bcd52054f5756e63f6f257e0829da7359016e5"
},
"downloads": -1,
"filename": "pygubu_designer-0.38-py3-none-any.whl",
"has_sig": false,
"md5_digest": "66fc308b96cc987ba78075019245e91f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 382640,
"upload_time": "2024-02-11T06:11:32",
"upload_time_iso_8601": "2024-02-11T06:11:32.990486Z",
"url": "https://files.pythonhosted.org/packages/cc/60/5805cbf8cfe49f3411a27722a2a8fee64ea77243b5095e227efdf66aca92/pygubu_designer-0.38-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "53f2aa962a3856c884b3aaaf462ffdb2920a2946ad0e1b7d7055db9d3d2cc31e",
"md5": "aba06fa83d8c8452921faed1ac0abe6d",
"sha256": "e7cc37446aa2b339229fe01f7a4f49d69eed0ab411c5aa9eb38699a2e25c3fac"
},
"downloads": -1,
"filename": "pygubu-designer-0.38.tar.gz",
"has_sig": false,
"md5_digest": "aba06fa83d8c8452921faed1ac0abe6d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1031577,
"upload_time": "2024-02-11T06:11:40",
"upload_time_iso_8601": "2024-02-11T06:11:40.778652Z",
"url": "https://files.pythonhosted.org/packages/53/f2/aa962a3856c884b3aaaf462ffdb2920a2946ad0e1b7d7055db9d3d2cc31e/pygubu-designer-0.38.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-11 06:11:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "alejandroautalan",
"github_project": "pygubu-designer#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pygubu-designer"
}