示例#1
0
if __name__ == "__main__":
    from os import path, pardir
    import sys
    sys.path.append(path.join(path.dirname(path.realpath(__file__)), pardir))
    from cli import main
    main.main()
示例#2
0
文件: cli.py 项目: eweast/filemgr
from cli.main import main

if __name__ == '__main__':
    main()  #todo change
示例#3
0
文件: cli.py 项目: eweast/filemgr
from cli.main import main

if __name__ == '__main__':
    main() #todo change
示例#4
0
            if testsExist:
                os.system("python3 -m unittest discover --pattern \"*_test.py\" {}".format(root))
    raise SystemExit

if sys.argv[1] == '-c':
    if len(sys.argv) > 2:
        config_path = sys.argv[2]
    else:
        print(help())
        raise SystemExit
else:
    if sys.argv[1] == 'start':
        if len(sys.argv) >= 4:
            if sys.argv[2] == '-c':
                config_path = sys.argv[3]
            else:
                print(help())
                raise SystemExit
        else:
            print(help())
            raise SystemExit
        server = main.Server(config_path)
        server.init()
        raise SystemExit
    else:
        print(help())
        raise SystemExit

main_cli.main(config_path)