Skip to content

Commit

Permalink
update put_logbox demo
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 authored May 23, 2024
1 parent be974de commit 3aac1c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pywebio_battery/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ def put_logbox(name: str, height=400, keep_bottom=True) -> Output:
:name: battery-put-logbox
:summary: Logbox widget
from pywebio_battery import put_logbox, logbox_append # ..demo-only
from pywebio.output import put_button
from pywebio_battery import put_logbox, logbox_append, logbox_clear # ..demo-only
# ..demo-only
import time
put_logbox("log")
put_button('Clear', lambda: logbox_clear("log"))
while True:
logbox_append("log", f"{time.time()}\n")
time.sleep(0.2)
Expand Down

0 comments on commit 3aac1c9

Please sign in to comment.