Moved some functionality in main_writer.py to functions in gradaudit.py

parent 15ba79fc
"""
Contains various useful functions for use in
main_writer.py and req_writer.py.
"""
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}', fil.read())
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):
pass
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