Arbitrium - The Easy Menu System For Python
Project description
# Arbitrium - The Easy Menu System For Python
## Install
`pip install arbitrium`
## Usage
```
from arbitrium import menu
from os import exit
@menu(["Option One", "Option Two", "Final Option"])
def choice_handler(choice):
if choice == 1:
# Option One Selected
pass
if choice == 2:
# Option Two Selected
pass
if choice == 3:
# Final Option Selected
exit(1)
# Calling the choice handler will also print the menu
choice_handler()
```
Will produce:
```
1) Option One
2) Option Two
99) Final Option
Please enter your choice:
```
**NOTE: Final Option will always be 99. It will run the choice handler once and then exit the choice handler function.**
## Install
`pip install arbitrium`
## Usage
```
from arbitrium import menu
from os import exit
@menu(["Option One", "Option Two", "Final Option"])
def choice_handler(choice):
if choice == 1:
# Option One Selected
pass
if choice == 2:
# Option Two Selected
pass
if choice == 3:
# Final Option Selected
exit(1)
# Calling the choice handler will also print the menu
choice_handler()
```
Will produce:
```
1) Option One
2) Option Two
99) Final Option
Please enter your choice:
```
**NOTE: Final Option will always be 99. It will run the choice handler once and then exit the choice handler function.**
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arbitrium-1.1.0.tar.gz
(2.3 kB
view details)
File details
Details for the file arbitrium-1.1.0.tar.gz.
File metadata
- Download URL: arbitrium-1.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.28.0 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8dbde3aa15306180330ca78ab1448f544510edd3bc038a1eda2b9070c845df
|
|
| MD5 |
9828099c23d03b8b87c8d0e97e8e99cc
|
|
| BLAKE2b-256 |
9d65c199f3ed2343238f8edf47d685bcf491619b65594f97e85e952d34abec11
|