1+ # -*- coding: utf-8 -*-
2+
3+ from __future__ import unicode_literals
4+
15from datetime import datetime
2- from . import settings
3- from . FindFirstDayofSemester import get_semester_start_date
4- from . GenerateICS import create_ics , export_ics
5- from . Lesson import Lesson
6+ import settings
7+ from FindFirstDayofSemester import get_semester_start_date
8+ from GenerateICS import create_ics , export_ics
9+ from Lesson import Lesson
610from lxml import etree
711from zeep import Client
12+ from builtins import input
813
914
1015def main ():
@@ -29,7 +34,8 @@ def main():
2934 print ('学期: 1 (上学期) / 2 (下学期)' )
3035 print ('学号: 你的南京航空航天大学学号' )
3136 print ("-------- 请填写以下信息 --------" )
32- xn = input ('学年: ' )
37+
38+ xn = input ('学年: ' .encode ('utf-8' ))
3339
3440 if '-' in xn :
3541
@@ -42,11 +48,11 @@ def main():
4248 else :
4349
4450 if not settings .DEBUG :
45- xq = input ('学期: ' )
51+ xq = input ('学期: ' . encode ( 'utf-8' ) )
4652 if not (xq == '1' or xq == '2' ):
4753 print ("学期输入错误! 提示:1为上学期,2为下学期!" )
4854 exit ()
49- xh = input ('学号: ' )
55+ xh = input ('学号: ' . encode ( 'utf-8' ) )
5056 print ("==================================================" )
5157
5258 semester_start_date = get_semester_start_date (years , xq , client )
@@ -55,8 +61,6 @@ def main():
5561 print ("未能获得学年 " + xn + " 的校历信息" )
5662 exit ()
5763
58-
59-
6064 request_data = {
6165 'xn' : xn ,
6266 'xq' : xq ,
@@ -107,7 +111,7 @@ def main():
107111
108112 # Print all lessons in cli
109113 # for lesson in lessons:
110- # lesson.print ()
114+ # lesson._print ()
111115
112116 cal = create_ics (lessons , semester_start_date )
113117 export_ics (cal , xn , xq , xh )
0 commit comments