PyWebIO v1.0.3 使用手册
出,将浏览器变成了一个“富文本终端”,可以用于构建简单的Web应用或基于 浏览器的GUI应用。 使用PyWebIO,开发者能像编写终端脚本一样(基于input 和print进行交互)来编写应用,无需具备HTML和JS的相关知识; PyWebIO还可 以方便地整合进现有的Web服务。非常适合快速构建对UI要求不高的应用。 特性 使用同步而不是基于回调的方式获取输入,代码编写逻辑更自然 非声明式布局,布局方式简单高效 code=True): 文本框的显示效果为: 这里 列举了一些常用的Codemirror选项,完整的Codemirror选项请见: https://codemirror.net/doc/manual.html#config 输入组 PyWebIO支持输入组, 返回结果为一个字典。pywebio.input.input_group() 接 受单项输入组成的列表作为参数, 返回以单项输入函数中的 name "python", # 编辑区代码语言 'theme': 'darcula', # 编辑区darcula主题, Visit https://codemirror.net/demo/theme.html#cobalt to get more themes }, value='import something\n# Write your python code') 输入组中同样支持使用 validate0 码力 | 106 页 | 7.34 MB | 1 年前3PyWebIO v1.6.2 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 148 页 | 7.46 MB | 1 年前3PyWebIO v1.5.1 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 144 页 | 7.46 MB | 1 年前3PyWebIO v1.6.1 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 148 页 | 7.46 MB | 1 年前3PyWebIO v1.6.3 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 150 页 | 7.46 MB | 1 年前3PyWebIO v1.6.0 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 148 页 | 7.46 MB | 1 年前3PyWebIO v1.5.2 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 144 页 | 7.46 MB | 1 年前3PyWebIO v1.5.0 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 144 页 | 7.46 MB | 1 年前3PyWebIO v1.7.0 Documentation
terminal scripts (interaction based on input and print function), without the need to have knowledge of HTML and JS. PyWebIO is ideal for quickly building interactive applications that don’t require a complicated Show a notification message toast('New message �') put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
'], # equal to ['text', put_text('
')] ['buttons' Output functions list popup('Popup title', [ put_html('Popup Content
'), 'plain html:
', # Equivalent to: put_text('plain html:
') put_table([['A', 'B'], ['C', 'D']]),0 码力 | 149 页 | 7.46 MB | 1 年前3PyWebIO v1.2.3 Documentation
writing terminal scripts (interaction based on input and print), without the need to have knowledge of HTML and JS. PyWebIO can also be easily integrated into existing Web services. PyWebIO is very suitable Codemirror options. For complete Codemirror options, please visit: https://codemirror.net/doc/manual.html#config Input Group PyWebIO uses input group to get multiple inputs in a single form. pywebio.input code language 'theme': 'darcula', # Codemirror theme. Visit https://codemirror.net/demo/theme.html#cobalt to get more themes }, value='import something\n# Write your python code') parameter, and returns0 码力 | 119 页 | 7.43 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9