Launching with __main__.py

This commit is contained in:
BasioMeusPuga
2018-03-15 11:24:28 +05:30
parent 5d3ce17447
commit 160226c6cd
2 changed files with 9 additions and 0 deletions

View File

@@ -19,8 +19,16 @@
import os
import sys
import hashlib
import pathlib
from PyQt5 import QtWidgets, QtGui, QtCore
# This allows for the program to be launched from the
# dir where it's been copied instead of needing to be
# installed
install_dir = os.path.realpath(__file__)
install_dir = pathlib.Path(install_dir).parents[1]
sys.path.append(str(install_dir))
from lector import database
from lector import sorter
from lector.toolbars import LibraryToolBar, BookToolBar