moved code for coherence

This commit is contained in:
2026-02-12 22:21:56 +01:00
parent 04ee42eaa7
commit 210c2d6231
12 changed files with 8 additions and 11 deletions

23
src/py_func/__main__.py Normal file
View File

@@ -0,0 +1,23 @@
from pathlib import Path
import sys
import traceback
def exception_handler(typ_exc, value, trbk):
"""Testium Exception handling"""
print("An unmanaged exception occured", exc_info=(typ_exc, value, trbk))
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()