本文整理汇总了Python中student.Student.parseTranscript方法的典型用法代码示例。如果您正苦于以下问题:Python Student.parseTranscript方法的具体用法?Python Student.parseTranscript怎么用?Python Student.parseTranscript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类student.Student
的用法示例。
在下文中一共展示了Student.parseTranscript方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from student import Student [as 别名]
# 或者: from student.Student import parseTranscript [as 别名]
# (Optional)
#p.setMajor("CHM")
# (Optional) Returning the Student's Major
print("Major set to " + p.returnMajor())
# (Optional) Lets the parser know which classes matter for major.
# If the Major is set, as above, this will be done automatically.
# This is legacy code, useful for testing new variations of Major requirements
#p.defineMajorReqs("DATA/required_PHY_courses.csv")
#p.defineMajorReqs()
# (Required) Parse text transcript for any classes
# Class defined as two or three letters, followed by two or three spaces,
# and then two or three numbers.
p.parseTranscript("DATA/jesse_unofficial_transcript.txt")
# (Required) Compare the Major requirements to the parsed transcript
p.compareMajorToTranscript()
# (Optional) Prints out Major Requirements in a Block Format
p.printMajorReqs()
print("")
print("-----")
print("")
# (Optional) Prints out all classes in the transcript
p.printCourses()
print("")
示例2: Student
# 需要导入模块: from student import Student [as 别名]
# 或者: from student.Student import parseTranscript [as 别名]
vbar=Scrollbar(master, orient=VERTICAL)
vbar.grid(row=0, column=1, sticky=N+S)
w.config(yscrollcommand=vbar.set)
vbar.config(command=w.yview)
hbar=Scrollbar(master, orient=HORIZONTAL)
hbar.grid(row=1, column=0, stick=E+W)
w.config(xscrollcommand=hbar.set)
hbar.config(command=w.xview)
w.bind('<Button-1>', onLeftClick)
#w.pack(side=LEFT, expand=True, fill=BOTH)
# Create student object.
p = Student(options.view)
p.parseTranscript(options.student_file)
p.compareMajorToTranscript()
course_list = []
if options.view:
course_list = p.returnMajorReqs()
else:
course_list = p.returnCourses()
for course in course_list:
if (course.returnSugSemester() != last_sem
or (not options.view and count > limit)):
start_x = (box_width + 10)
start_x *= int(last_sem) if (options.view) else col
start_y = 10
stop_x = start_x + 220