Add __main__.py entry point

master
Lertsenem 2020-07-22 18:10:16 +02:00
parent acba570218
commit c9bc474477
1 changed files with 14 additions and 0 deletions

14
lokrez/__main__.py Normal file
View File

@ -0,0 +1,14 @@
import sys
# Add module parent directory to path if needed
if __package__ is None and not hasattr(sys, "frozen"):
import pathlib
path = pathlib.Path(__file__).absolute()
sys.path.insert(0, str(path.parent.parent))
import lokrez
if __name__ == '__main__':
lokrez.main()