当前位置: 首页>>代码示例>>Python>>正文


Python Parser.build_spawn_from_match方法代码示例

本文整理汇总了Python中parsing.parser.Parser.build_spawn_from_match方法的典型用法代码示例。如果您正苦于以下问题:Python Parser.build_spawn_from_match方法的具体用法?Python Parser.build_spawn_from_match怎么用?Python Parser.build_spawn_from_match使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在parsing.parser.Parser的用法示例。


在下文中一共展示了Parser.build_spawn_from_match方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: parse_match

# 需要导入模块: from parsing.parser import Parser [as 别名]
# 或者: from parsing.parser.Parser import build_spawn_from_match [as 别名]
 def parse_match(self, file: str, match_i: int):
     """
     Either adds sets the match and calls add_spawns to add the
     spawns found in the match or starts the results of all files
     found in the specified file and displays the results in the
     other frames.
     """
     print("[FileFrame] Parsing file '{}', match {}".format(file, match_i))
     self.main_window.middle_frame.statistics_numbers_var.set("")
     self.main_window.ship_frame.ship_label_var.set("No match or spawn selected yet.")
     lines = Parser.read_file(file)
     player_list = Parser.get_player_id_list(lines)
     file_cube, match_timings, _ = Parser.split_combatlog(lines, player_list)
     player_name = Parser.get_player_name(lines)
     match = file_cube[match_i]
     results = matchstats.match_statistics(file, match, match_timings[::2][match_i])
     self.update_widgets(*results)
     match_list = Parser.build_spawn_from_match(match)
     self.main_window.middle_frame.time_view.insert_spawn(match_list, player_name)
     match_timing = datetime.combine(Parser.parse_filename(file).date(), match_timings[::2][match_i].time())
     self.main_window.middle_frame.scoreboard.update_match(match_timing)
开发者ID:RedFantom,项目名称:GSF-Parser-Public,代码行数:23,代码来源:file.py

示例2: parse_match

# 需要导入模块: from parsing.parser import Parser [as 别名]
# 或者: from parsing.parser.Parser import build_spawn_from_match [as 别名]
 def parse_match(self, elements: list):
     """
     Either adds sets the match and calls add_spawns to add the
     spawns found in the match or starts the parsing of all files
     found in the specified file and displays the results in the
     other frames.
     :param elements: specifies file and match
     """
     self.clear_data_widgets()
     self.main_window.middle_frame.statistics_numbers_var.set("")
     self.main_window.ship_frame.ship_label_var.set("No match or spawn selected yet.")
     file_name, match_index = elements[0], int(elements[1])
     lines = Parser.read_file(file_name)
     player_list = Parser.get_player_id_list(lines)
     file_cube, match_timings, _ = Parser.split_combatlog(lines, player_list)
     player_name = Parser.get_player_name(lines)
     match = file_cube[match_index]
     results = matchstats.match_statistics(file_name, match, match_timings[::2][match_index])
     self.update_widgets(*results)
     match_list = Parser.build_spawn_from_match(match)
     self.main_window.middle_frame.time_view.insert_spawn(match_list, player_name)
开发者ID:RedFantom,项目名称:GSF-Parser-Public,代码行数:23,代码来源:fileframe.py


注:本文中的parsing.parser.Parser.build_spawn_from_match方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。