Skip to content

Commit 8e1edd9

Browse files
committed
Command line helper to calc solution for a day
Day to calc solution for given as argument or insert as input Solution gets calculated and printed
1 parent ca2517c commit 8e1edd9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

calc_solution.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
import sys
3+
4+
if __name__ == "__main__":
5+
if len(sys.argv) > 1:
6+
nr = sys.argv[1]
7+
else:
8+
nr = input("Day: ")
9+
sys.path.insert(0, './'+nr)
10+
import solution
11+
solution = solution.Solution(nr)
12+
solution.calculate()
13+
print(solution)

0 commit comments

Comments
 (0)