-
请问如何实现每次只展示一条句子,该句处理完再跳到下一条句子?下面的例子中无法实现这一停顿,请问有什么解决方案吗?
|
Beta Was this translation helpful? Give feedback.
Answered by
wang0618
Oct 14, 2021
Replies: 2 comments 2 replies
-
使用 # coding=utf-8
import pywebio
from pywebio.input import *
from pywebio.output import *
from pywebio.session import *
def main():
sent_list = ['我爱国', '我爱家']
for sent in sent_list:
with use_scope('newpage', clear=True):
put_markdown('## 句子展示')
put_text(sent)
keep = actions("是否保留", ['是', '否'])
if keep == '是':
pass
if __name__ == '__main__':
pywebio.start_server(main, port=8080, debug=True, cdn=False) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mubidiy
-
非常感谢您的解答。请问还有哪些阻塞方法吗?比如放个input也可以实现阻塞。想问有没有仅为了起到阻塞作用,却并不需要获取用户选择或额外输入的方式呢? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用
pywebio.input.actions()
来阻塞式获取用户选择: