__main__.py 742 Bytes
Newer Older
Matt Clarkson's avatar
Matt Clarkson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/python
#  -*- coding: utf-8 -*-
"""scikit-surgerycore"""

import sys

if __name__ == "__main__" and not __package__:
    # To allow the package's main function to be executed without the -m switch,
    # i.e. "python sksurgerycore", we have to explicitly set the
    # module name and append the parent directory to the sys.path (see PEP 366)
    from os import path
    __package__ = "sksurgerycore"  # pylint: disable=redefined-builtin
    sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
    sys.path.append(path.dirname(path.dirname(__file__)))

# pylint: disable=wrong-import-position
from sksurgerycore.ui.sksurgerycore_command_line import main

if __name__ == "__main__":
    sys.exit(main(sys.argv[1:]))