-
I need to change the data in put_text every second, use_scope with clear = True does not suit me, because even with output_animation turned off, the text disappears for half a second and it looks very strange. What other options are there? |
Beta Was this translation helpful? Give feedback.
Answered by
wang0618
Jan 4, 2023
Replies: 1 comment 1 reply
-
It shouldn't be unless the network latency between you and the app is very high. def update_scope_text(scope_name, text):
run_js(f"$('#pywebio-scope-{scope_name}').text({text!r})")
put_scope('text')
while True:
update_scope_text('text', str(time.time()))
time.sleep(1) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
d4nila
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It shouldn't be unless the network latency between you and the app is very high.
Anyway, here is a hacky way to avoid this delay: