Exemplo n.º 1
0
notify = EmailNotifier(sender,sender_pass)



#if True:
try:
	#parse schedule file
	schedParser.parseFile('Spring2015.scd')

	courseList = schedParser.getCourseList()
	schedules = schedParser.getSchedules()


	#Login to access plus
	nav.bypassLogin('student_id','student_pass', '0001soQW4_NsnMLgyDhE4-RQDsP:14a0b94d8')
	nav.gotoClassRegistration('ran_num')



	#check the status of the current schedule
	baseSchedule = manager.checkCurrentSchedule()
	rank = manager.getScheduleRank(baseSchedule, schedules)

	#if it is already at it's best then we can leave
	if rank == 0:
		print "Schedule is complete!"

		if heartbeat:
			notify.notifyHeartBeat("Schedule is complete, suggest terminating program")
			notify.sendEmail(recipient)
notify = EmailNotifier(sender,sender_pass)



#if True:
try:
	#parse schedule file
	schedParser.parseFile(schedule)

	courseList = schedParser.getCourseList()
	schedules = schedParser.getSchedules()


	#Login to access plus
	nav.bypassLogin(student_id,student_pass, last_cookie)
	nav.gotoClassRegistration(RAN_number)



	#check the status of the current schedule
	baseSchedule = manager.checkCurrentSchedule()
	rank = manager.getScheduleRank(baseSchedule, schedules)

	#if it is already at it's best then we can leave
	if rank == 0:
		print "Schedule is complete!"

		if heartbeat:
			notify.notifyHeartBeat("Schedule is complete, suggest terminating program")
			notify.sendEmail(recipient)