本文整理匯總了Python中individual.Individual.directory方法的典型用法代碼示例。如果您正苦於以下問題:Python Individual.directory方法的具體用法?Python Individual.directory怎麽用?Python Individual.directory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類individual.Individual
的用法示例。
在下文中一共展示了Individual.directory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Individual
# 需要導入模塊: from individual import Individual [as 別名]
# 或者: from individual.Individual import directory [as 別名]
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.DEBUG)
console_handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT))
logger.addHandler(console_handler)
parser = argparse.ArgumentParser(description = "Individual prac runner")
parser.add_argument('-d')
parser.add_argument('-p')
args = parser.parse_args()
part = args.p
user_id = re.search("([a-z]){6}([0-9]){3}", args.d).group(0)
submitter = Individual(user_id = user_id,
logger = logger.getChild('manual_marker'))
submitter.directory = args.d
submitter.submission_directory = args.d
tester_module = importlib.import_module("prac_exam_2_part_{n}_tests".format(n = part))
TesterClass = getattr(tester_module, "PracExam2Part{n}Tests".format(n = part))
#tester_module = importlib.import_module("prac_exam_0_tests".format(n = part))
#TesterClass = getattr(tester_module, "PracExam0Tests".format(n = part))
tester = TesterClass(submitter, logger.getChild('pe2'))
tester.catalogue_submission_files()
tester.build()
tester.run_tests()
logger.info("Final Mark: {m:g}".format(m = float(submitter.mark)))