def find_host_option(in_option): file_name = "hostconfig.uaetemp" if os.path.isfile(file_name) is False: return "" with open(file_name) as f: content = f.readlines() content = [x.strip() for x in content] f.close() answer = "" for this_line in content: if text_utils.left(this_line, len(in_option)) == in_option: answer = this_line.replace(in_option, "") answer = answer.replace("=", "").strip() break return answer
"%Y-%m-%d at %H:%M:%S") + '' + chr(10) for file2 in Path(input_directory + "/").glob('**/*.lha'): archive_path = str(file2) this_file = os.path.basename(archive_path) # check for a skip, and that its value for skipping if (FULL_REFRESH == False and XML_OLD.find('<game filename="' + this_file[0:len(this_file) - 4].replace("&", "&") + '"') > -1): print("Skipping: " + text_utils.FontColours.OKBLUE + text_utils.FontColours.BOLD + this_file + text_utils.FontColours.ENDC) COMPLETE_MSG = COMPLETE_MSG + "Skipped: " + this_file + chr(10) elif text_utils.left(this_file, 2) == "._": ... count = count - 1 else: print() print("Processing: " + text_utils.FontColours.FAIL + text_utils.FontColours.BOLD + this_file + text_utils.FontColours.ENDC) try: slave_archive = LhaSlaveArchive(archive_path, hash_algorithm) file_details = openretroid.parse_file(archive_path) #print(text_utils.FontColours.OKGREEN + slave_archive.absolute_path + text_utils.FontColours.ENDC) slave_archive.read_lha()