def startup(): env_inst.ui_super = QSingleApplication(sys.argv) env_inst.ui_super.setApplicationName('TacticHandler_TacticApiServer') env_inst.ui_super.setStyle('plastique') env_mode.set_mode('api_server') date_str = datetime.date.strftime(dl.session_start, '%d_%m_%Y_%H_%M_%S') stdout_path = u'{0}/log/api_server_stdout_{1}.log'.format(env_mode.get_current_path(), date_str) sys.stdout = open(stdout_path, 'w') main_standalone.setPaletteFromDct(main_standalone.palette) env_inst.ui_super.start_single(ui_tactic_api_server_classes.Ui_TacticApiClient()) sys.exit(env_inst.ui_super.exec_())
def init_env(current_path): env_mode.set_current_path(current_path) env_mode.set_mode('maya')