Better complete debug function
This commit is contained in:
@@ -79,8 +79,12 @@ class MatchGroup:
|
|||||||
|
|
||||||
|
|
||||||
def debug(*a: Any, **kw: Any) -> None:
|
def debug(*a: Any, **kw: Any) -> None:
|
||||||
kw['file'] = sys.stderr
|
from kittens.tui.loop import Debug
|
||||||
print(*a, **kw)
|
if not hasattr(debug, 'output'):
|
||||||
|
d = Debug()
|
||||||
|
d.fobj = sys.stderr.buffer # type: ignore
|
||||||
|
setattr(debug, 'output', d)
|
||||||
|
getattr(debug, 'output')(*a, **kw)
|
||||||
|
|
||||||
|
|
||||||
class Delegate:
|
class Delegate:
|
||||||
|
|||||||
Reference in New Issue
Block a user