Compare commits
3 Commits
747f573201
...
70e0ec408a
Author | SHA1 | Date |
---|---|---|
waldek | 70e0ec408a | |
waldek | 14322caf3e | |
waldek | 88f35d85e5 |
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
|
@ -68,6 +68,8 @@ class Question(object):
|
||||||
"""needs quite some work"""
|
"""needs quite some work"""
|
||||||
if not isinstance(answers, list):
|
if not isinstance(answers, list):
|
||||||
raise TypeError
|
raise TypeError
|
||||||
|
if len(answers) == 0:
|
||||||
|
return False
|
||||||
right_answers = list(self._answers) # need a copy so we don't change for future questions
|
right_answers = list(self._answers) # need a copy so we don't change for future questions
|
||||||
for answer in answers:
|
for answer in answers:
|
||||||
try:
|
try:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,3 +13,6 @@ The `./standalone_tui.py` is a basic [MVC](https://realpython.com/the-model-view
|
||||||
All development should be done in the `testing` branch and brought to the `master` branch with merge requests.
|
All development should be done in the `testing` branch and brought to the `master` branch with merge requests.
|
||||||
|
|
||||||
|
|
||||||
|
## Standalone TUI
|
||||||
|
|
||||||
|
![screenshot](./assets/screenshot_1.png)
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Tui(object):
|
||||||
blank
|
blank
|
||||||
"""
|
"""
|
||||||
answers = []
|
answers = []
|
||||||
results = input("What's your answer? (only numbers, separated by a SPACE) ")
|
results = input("\n What's your answer? (only numbers, separated by a SPACE) ")
|
||||||
results = results.split()
|
results = results.split()
|
||||||
for result in results:
|
for result in results:
|
||||||
if result.isdigit():
|
if result.isdigit():
|
||||||
|
@ -115,7 +115,7 @@ class Application(object):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
filepath = pathlib.Path("./data/multiple.csv")
|
filepath = pathlib.Path("./data/list_book1.csv")
|
||||||
interface = Tui()
|
interface = Tui()
|
||||||
app = Application(filepath, interface)
|
app = Application(filepath, interface)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue