Moved some functionality in to functions in

parent 15ba79fc
Contains various useful functions for use in and
import re
def get_courses():
with open('course.lp', 'r') as fil:
valid_courses = re.findall('[a-z]+[0-9][0-9V][0-9]{2}',
return valid_courses
def get_required_courses(degree, major, year):
filename = '{0}/{1}/{2}/{1}{2}req.lp'.format(degree, major, year)
contents = open(filename).read()
req_courses = re.findall('[a-z]+[0-9][0-9V][0-9]{2}', contents)
return req_courses
def gen_main(student, degree, major, year, spec, courses):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment