A simple GUI library for Python
Project description
# sgui
A simple GUI library for Python
Currently, sgui is just simple a wrapper around [Tkinter](https://wiki.python.org/moin/TkInter). (Python's de-facto standard GUI) In the future, backends for other languages like [pyside2](http://wiki.qt.io/Qt_for_Python) may be added.
sgui aims to be a simple and consistent tool for creating basic graphical user interfaces in python.
sgui is currently under development. Basic usage of the library should not change much. But as it is still in early development, newer versions may break scripts written for older versions.
[sgui on github](https://github.com/DGriffin91/sgui)
### rot13 Code Example
```python
import sgui, codecs
#Update the rotatedTextBox when the normal text changes
def encode(textBox):
rotatedTextBox.string = codecs.encode(textBox.string, 'rot_13')
#Start window
window = sgui.Tk()
#Vertical Layout frame
mainBox = sgui.VBox(window)
sgui.Label(mainBox, string = "Normal Text:")
normalTextBox = sgui.TextBox(mainBox, string = "Some normal text", command = encode)
sgui.Label(mainBox, string = "Rotated Text:")
rotatedTextBox = sgui.TextBox(mainBox)
window.startGUI()
```
### Currently Supported Widgets
* Textbox
* Textentry
* Button
* Label
* Checkbox
* Listbox
* Radiobuttons
* Canvas
* VBox
* HBox
##### Most widgets support:
* `.string` for text manipulation
* `.command` for call back function
* `.enabled` can be True or False for enabling/disabling control
* `.tooltip` for hover over tool tips
##### For example:
```python
import sgui
window = sgui.Tk()
def foo(btn):
print(btn.string, "foo!")
testButton = sgui.Button(window)
testButton.string = "I'm a button!"
testButton.command = foo
testButton.enabled = False
testButton.tooltip = "This button is disabled, it will never foo!"
window.startGUI()
```
##### `.string` and `.command` can be declared when the widget is created:
```python
testButton = sgui.Button(window, string = "I'm a button!", command = foo)
```
A simple GUI library for Python
Currently, sgui is just simple a wrapper around [Tkinter](https://wiki.python.org/moin/TkInter). (Python's de-facto standard GUI) In the future, backends for other languages like [pyside2](http://wiki.qt.io/Qt_for_Python) may be added.
sgui aims to be a simple and consistent tool for creating basic graphical user interfaces in python.
sgui is currently under development. Basic usage of the library should not change much. But as it is still in early development, newer versions may break scripts written for older versions.
[sgui on github](https://github.com/DGriffin91/sgui)
### rot13 Code Example
```python
import sgui, codecs
#Update the rotatedTextBox when the normal text changes
def encode(textBox):
rotatedTextBox.string = codecs.encode(textBox.string, 'rot_13')
#Start window
window = sgui.Tk()
#Vertical Layout frame
mainBox = sgui.VBox(window)
sgui.Label(mainBox, string = "Normal Text:")
normalTextBox = sgui.TextBox(mainBox, string = "Some normal text", command = encode)
sgui.Label(mainBox, string = "Rotated Text:")
rotatedTextBox = sgui.TextBox(mainBox)
window.startGUI()
```
### Currently Supported Widgets
* Textbox
* Textentry
* Button
* Label
* Checkbox
* Listbox
* Radiobuttons
* Canvas
* VBox
* HBox
##### Most widgets support:
* `.string` for text manipulation
* `.command` for call back function
* `.enabled` can be True or False for enabling/disabling control
* `.tooltip` for hover over tool tips
##### For example:
```python
import sgui
window = sgui.Tk()
def foo(btn):
print(btn.string, "foo!")
testButton = sgui.Button(window)
testButton.string = "I'm a button!"
testButton.command = foo
testButton.enabled = False
testButton.tooltip = "This button is disabled, it will never foo!"
window.startGUI()
```
##### `.string` and `.command` can be declared when the widget is created:
```python
testButton = sgui.Button(window, string = "I'm a button!", command = foo)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sgui-0.1.3.tar.gz
(5.1 kB
view details)
File details
Details for the file sgui-0.1.3.tar.gz.
File metadata
- Download URL: sgui-0.1.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e57b221cc20aace0507fc8777764708eebee63c1390643677586a586b88a9006
|
|
| MD5 |
bf7b7401d21888e94d47ae6eaed6eeca
|
|
| BLAKE2b-256 |
575d450b8b61113630ac7c98b742b08b57d24c95693d1825a11b855ffb47fee3
|