Files
testium/src/py_func/__main__.py
2026-02-21 11:33:41 +01:00

23 lines
481 B
Python

from pathlib import Path
import sys
import traceback
def exception_handler(typ_exc, value, trbk):
"""Testium Exception handling"""
print("An unmanaged exception occured")
print(f"Critical failure : '{value}'.")
tb = traceback.format_exception(typ_exc, value, trbk)
print("".join(tb))
sys.excepthook = exception_handler
p = Path(__file__)
p = p.parent / ".."
p = p.resolve()
sys.path.append(p)
from py_func import main
if __name__ == '__main__':
main()