當前位置: 首頁>>代碼示例>>Python>>正文


Python Individual.submission_directory方法代碼示例

本文整理匯總了Python中individual.Individual.submission_directory方法的典型用法代碼示例。如果您正苦於以下問題:Python Individual.submission_directory方法的具體用法?Python Individual.submission_directory怎麽用?Python Individual.submission_directory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在individual.Individual的用法示例。


在下文中一共展示了Individual.submission_directory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Individual

# 需要導入模塊: from individual import Individual [as 別名]
# 或者: from individual.Individual import submission_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)))
開發者ID:jgowans,項目名稱:prac_automarker_client,代碼行數:31,代碼來源:individual_runner.py


注:本文中的individual.Individual.submission_directory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。