-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement AnswerRegistry and AnswerWidget
* new class exercise.Textarea that implements AnswerWidget * CodeDemo implements AnswerWidget * CodeDemo: merge member functions handle_checks_result and _output_results * add _utils.py with Printer static class for nicer printing using termcolor * replace prints with Printer.print_* functions * adapt save css style to more readable * parameters in ParameterPanel are now settable
- Loading branch information
1 parent
520988c
commit d7f901f
Showing
13 changed files
with
1,683 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from termcolor import colored | ||
|
||
|
||
class Printer: | ||
# move to output | ||
@staticmethod | ||
def print_error_message(message: str): | ||
print(colored(message, "red", attrs=["bold"])) | ||
|
||
@staticmethod | ||
def print_success_message(message: str): | ||
print(colored(message, "green", attrs=["bold"])) | ||
|
||
@staticmethod | ||
def print_info_message(message: str): | ||
print(colored(message, "blue", attrs=["bold"])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from ._widget_answer_registry import AnswerRegistry, AnswerWidget | ||
|
||
__all__ = ["AnswerWidget", "AnswerRegistry"] |
Oops, something went wrong.