import sys
if __name__ == "__main__":
    if __package__ is None:
        # make relative imports work as described here: https://peps.python.org/pep-0366/#proposed-change
        __package__ = "cpdctrl_gui"
        from os import path
        filepath = path.realpath(path.abspath(__file__))
        # Make sure both projects are loaded from the source tree instead of installed packages
        # parent dir of both projects
        pdir = path.dirname(path.dirname(path.dirname(filepath)))
        sys.path.insert(0, path.join(pdir, "cpdctrl-gui"))
        sys.path.insert(0, path.join(pdir, "cpdctrl"))
print(sys.path)
from cpdctrl_gui import init

if __name__ == '__main__':
    import sys

    sys.exit(init.run())