time.sleep(60) def Dispatcher(command=None): '''Точка входа''' if command: argumentsList = shlex.split(command) else: argumentsList = sys.argv[1:] command = ' '.join(argumentsList) '''Запускаем нужный launcher''' if command.find('--batch') >= 0: launcher = LauncherBatch() elif command.find('--schedule') >= 0: launcher = LauncherSchedule() elif command.find('--test') >= 0: launcher = LauncherTest() else: launcher = LauncherSingle() launcher.Execute(argumentsList) '''Предотвращаем повторный запуск для упрощения разработки и отладки''' sys.exit() if __name__ == '__main__': Dispatcher() if not common.DevelopmentMode(): Dispatcher() command = '--user=searchxxx --keywords=shoes --category=design --boards="For the Home,My Home" --test-mode' Dispatcher(command)
# coding=utf8 from __future__ import print_function import sys import common # TODO: реализовать if (__name__ == '__main__') and common.DevelopmentMode(): pass