(Go to changelog)
- Installing
- Constants and vars
- Recommended structure
- Functions and syntax
- Supporting
- Build
- Script configurations
- Workflows
python -m pip install metaerrorsConstants indicate the popup type, and std_title and msg_format indicate the standard title and message format. Example of the message format:
msg_format = "{name}: {msg}"msg_format = "{name}: {msg}"
std_title = "The program terminated with the error:" # For metaraiseTo redirect your program's errors to metaraise,
I recommend the following structure:
from metaerrors import metaraise
try:
#Your program
except Exception as e:
metaraise(e)def show(msg: str, title: str, mode: int):
"""Displays a pop-up"""msg - your message
title - title of popup
mode - display mode (INFO, WARN, ERROR, STD)
def metaraise(err: BaseException, title: str = std_title, frmt: str = msg_format, do_exit: bool = False):
"""Raise Replacement"""err - a BaseException type object
title - title
frmt - msg_format
do_exit - Determines whether an exit with code 1 will be performed
This library is supported for Windows, Linux, and macOS.
Some functions are not supported by some OS
All functions are supported in Windows
The zenity package does not support the header in Linux, and the notify-send package does not support the pop-up type
macOS does not support the pop-up type (INFO, WARN, ERROR, STD).
On FreeBSD, modes only work with the zenity package installed.
To build the wheel, run:
python -m pip install setuptools wheel
python setup.py bdist_wheelDon't forget to change the config in the setup.py file before doing this.
All wheels are stored in the dist folder
If your editor supports run configurations (for example, PyCharm), then you will be able to run various scripts:
- Clear wheels
- Del lib
- Install
- Build wheel
- Setup
- Clean + Build Wheel
This project contains one workflow that:
- collects the wheel library,
- adds it to the release files,
- and uploads the release to PyPi.