+ my_name + " discarded!" else: events_stack.append(datetime_str_start) cal.events.append(new_event) return # Iterates through every input course for index in range(len(course_name)): name = course_name[index] num = course_num[index] sec = course_section[index] # Gets course info course_info = uw.term_course_schedule(term_num, name, num) if not course_info: print "Warning! Course " + name + " " + num + " could not be found!" continue custom_pick = 0; section_found = 0; for section in course_info: # If there are sections manually selected if section["associated_class"] == 99: custom_pick = 1;
','.join(course.get("instructions")),\ course.get("units"),\ course.get("title"),\ course.get("course_id"),\ course.get("subject").lower(),\ course.get("catalog_number"),\ course.get("description"),\ course.get("prerequisites"),\ course.get("antirequisites"),\ online) reply += \ "\n\n-----------------------------------------------\ \n\n" # Check for SCHEDULE flag if len(code_list) == 3 and code_list[2] in SCHEDULE: course_schedule = uw.term_course_schedule(\ current_term, code_list[0].upper(), code_list[1]) if not course_schedule: reply += "This course is not offered this term" else: for lec in course_schedule: for classes in lec.get("classes"): if classes.get("instructors") \ and classes.get("date").get("weekdays"): reply += "*{} | {} {}-{} | {} | {} {}*\n\n"\ .format(\ lec.get("section"),\ classes.get("date").get("weekdays"),\ classes.get("date").get("start_time"),\ classes.get("date").get("end_time"),\