#_*_ coding:UTF-8 _*___author__ = 'shaowei'import osimport HandleXcodeBuildimport stringimport sysdefault_work_path = "~/Git/PushPrompt" # 默认的project根目录# def check_input_bool(default_path):# prompt_input = "是否开始编译默认项目- " + default_path + " ; yes or no :"# while True:# user_input = raw_input(prompt_input)# user_input = user_input.lower()# if user_input == "yes":# return True# elif user_input == "no":# return False# else:# print "only input 'yes' or 'no', please input again " + user_input## default_work_path = "~/Git/PushPrompt"## work_path = raw_input("please project root folder path:\n")# if os.path.isdir(os.path.expanduser(work_path)):# print "start build:", work_path# else:# print "路径:", work_path, "不存在"# user_select = check_input_bool(default_work_path)# if user_select:# work_path = default_work_path# else:# sys.exit() # 退出程序## work_path = os.path.expanduser(work_path)## #切换到工作目录# os.chdir(work_path)## params = HandleXcodeSetting.handle_string()## path_params = {}# for key in params:# value = params[key]# if string.find(value, "fygoijpftcufifdfzfndmdhcxmir") != -1:# path_params[key] = value### # output# for key, value in path_params.items():# print value, " : ", keyimport commandswork_path = os.path.expanduser(default_work_path)os.chdir(work_path)shell_build_list = "xcodebuild -list"status, output = commands.getstatusoutput(shell_build_list)arr_param = output.split("\n")start_get = Falsefor item in arr_param:item_strip = item.strip()# print len(item_strip), ":", itemif start_get:if len(item_strip) == 0:breakelse:print "p:", item_stripelse:if item_strip.startswith("Build Configurations"):start_get = Truesys.exit()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。