Skip to content

Commit f658479

Browse files
committed
Merge branch 'dev' of github.com:TINF21CS1/python-campusnet into dev
2 parents 649cfa0 + 8aae070 commit f658479

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

print_exams_as_table.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import CampusNet
2+
from tabulate import tabulate
3+
4+
username = input("Username (mit @!): ")
5+
password = input("Password: ")
6+
7+
s = CampusNet.CampusNetSession(username, password)
8+
9+
table = list()
10+
11+
for module in s.modules:
12+
for exam in s.get_exams_for_module(module):
13+
table.append([module.num, module.name, exam.semester, exam.description, exam.grade])
14+
15+
print(tabulate(table))

0 commit comments

Comments
 (0)