[core/output] Rewrite to hide sys.stout

Add generic "draw()" method that redirects internally to the actual
calls. These can now produce JSON, which is nicer because:

1. Easier to use during testing
2. More flexible
3. Centralizes printing (somewhat)

Still, the "suffix" concept isn't really nice, but so far, I have no
better approach.
This commit is contained in:
Tobias Witek 2020-02-01 21:37:38 +01:00
parent b7ca5eb3a5
commit 66537fbe05
4 changed files with 44 additions and 20 deletions

View file

@ -3,10 +3,11 @@
"""Test module
"""
import core.widget
import core.module
class Module(core.module.Module):
def __init__(self):
pass
super().__init__(core.widget.Widget('test'))
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4