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"""
|
||||
if not isinstance(answers, list):
|
||||
raise TypeError
|
||||
if len(answers) == 0:
|
||||
return False
|
||||
right_answers = list(self._answers) # need a copy so we don't change for future questions
|
||||
for answer in answers:
|
||||
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.
|
||||
|
||||
|
||||
## Standalone TUI
|
||||
|
||||
![screenshot](./assets/screenshot_1.png)
|
||||
|
|
|
@ -52,7 +52,7 @@ class Tui(object):
|
|||
blank
|
||||
"""
|
||||
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()
|
||||
for result in results:
|
||||
if result.isdigit():
|
||||
|
@ -115,7 +115,7 @@ class Application(object):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
filepath = pathlib.Path("./data/multiple.csv")
|
||||
filepath = pathlib.Path("./data/list_book1.csv")
|
||||
interface = Tui()
|
||||
app = Application(filepath, interface)
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue