本文整理汇总了Python中Analysis.get_objects方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.get_objects方法的具体用法?Python Analysis.get_objects怎么用?Python Analysis.get_objects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis.get_objects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Exception
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import get_objects [as 别名]
Load data, analyze, and output results.
"""
import os
import pandas
import pdb
import sys
import Analysis
import Constants
import Basketball
import Misc
if __name__ == "__main__":
tournaments = {}
analysis_options = Analysis.get_objects()
num_analysis_options = len(analysis_options)
# prompt user to select analysis method
prompt = "Please enter number of desired analysis method:\n"
for i in range(num_analysis_options):
prompt += "%s) %s\n" % (i, analysis_options[i].get_name())
user_input = raw_input(prompt)
# check user input
if user_input.isdigit() and (int(user_input) in range(num_analysis_options)):
analysis = analysis_options[int(user_input)]
else:
raise Exception("Invalid entry '%s', please enter one of following values %s." % (user_input, range(num_analysis_options)))
# prompt user for Kaggle output
kaggle_output_options = {