PyWebIO v0.3.0 使用手册output import * 引入。 基本输出 PyWebIO提供了一些便捷函数来输出表格、链接等格式: # 文本输出 put_text("Hello world!") # 表格输出 put_table([ ['商品', '价格'], ['苹果', '5.5'], ['香蕉', '7'], ]) # Markdown输出 put_markdown('~~删除线~~') # word!') 所有输出内容的函数名都以 put_ 开始 PyWebIO提供的全部输出函数请见 pywebio.output 模块 组合输出 put_table() 还支持以 put_xxx 类型的输出函数作为单元格内容: put_table([ ['Type', 'Content'], ['html', 'X2'], ['text', put_text('
')] ['markdown', put_markdown('`Awesome PyWebIO!`')], ['file', put_file('hello.text', b'')], ['table', put_table([['A', 'B'], ['C', 'D']])] ]) 上例显示效果如下: 事件回调 PyWebIO把程序与用户的交互分成了输入和输出两部分:输入函数为阻塞式调 用,在用0 码力 | 72 页 | 8.55 MB | 1 年前3
PyWebIO v1.0.3 使用手册start_server(bmi, port=80) 便可以在80端口提供 bmi() 服务( 在线Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=bmi] )。 将 bmi() 服务整合到现有的Web框架请参考 与Web框架集成 Documentation 这个文档同时也提供 PDF 和 Epub 格式 [https://readthedocs PyWebIO中,所有的逻辑都通过编写Python代码实现。 你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成 了浏览器。通过PyWebIO提供的命令式API, 你可以简单地调用 put_text 、 put_image 、 put_table 等函数输出文本、图片、表格等内容到浏览器,也可 以调用 input 、 select 、 file_upload 等函数在浏览器上显示不同表单来接收 用 data['age'] <= 0: return ('age', '年龄不能为负数!') # 文本输出 put_text("Hello world!") # 表格输出 put_table([ ['商品', '价格'], ['苹果', '5.5'], ['香蕉', '7'], ]) PyWebIO提供的全部输出函数见 pywebio.output 模块。另外,PyWebIO还支持0 码力 | 106 页 | 7.34 MB | 1 年前3
PyWebIO v0.3.0 使用手册import * 引入。 基本输出 PyWebIO 提供了一些便捷函数来输出表格、链接等格式: # 文本输出 put_text("Hello world!") # 表格输出 put_table([ ['商品', '价格'], ['苹果', '5.5'], ['香蕉', '7'], ]) # Markdown 输出 put_markdown('~~ 删除线~~') # 文件输出 提供的全部输出函数请见pywebio.output 模块 14 Chapter 4. Documentation PyWebIO, 发布 0.3.0 组合输出 put_table() 还支持以 put_xxx 类型的输出函数作为单元格内容: put_table([ ['Type', 'Content'], ['html', 'X2'], ['text', put_text('
')] ['markdown', put_markdown('`Awesome PyWebIO!`')], ['file', put_file('hello.text', b'')], ['table', put_table([['A', 'B'], ['C', 'D']])] ]) 上例显示效果如下: 事件回调 PyWebIO 把程序与用户的交互分成了输入和输出两部分:输入函数为阻塞式调用,在用户提交表单之前将不0 码力 | 70 页 | 1.41 MB | 1 年前3
PyWebIO v1.0.3 使用手册Python 代码实现。 你可以按照编写控制台程序的逻辑编写 PyWebIO 应用,只不过这里的终端变成了浏览器。通过 PyWebIO 提 供的命令式 API,你可以简单地调用 put_text 、put_image 、put_table 等函数输出文本、图片、表格 等内容到浏览器,也可以调用 input 、select 、file_upload 等函数在浏览器上显示不同表单来接收用 户的输入。此外 以在任意时刻调用输出函数。 基本输出 PyWebIO 提供了一系列函数来输出表格、链接等格式: # 文本输出 put_text("Hello world!") # 表格输出 put_table([ ['商品', '价格'], ['苹果', '5.5'], ['香蕉', '7'], ]) # Markdown 输出 put_markdown('~~ 删除线~~') # 文件输出 还支持一些第三方库来进行数据可视 化,参见第三方库生态 。 组合输出 函数名以 put_ 开始的输出函数,可以与一些输出函数组合使用,作为最终输出的一部分: put_table() 支持以 put_xxx() 调用作为单元格内容: put_table([ ['Type', 'Content'], ['html', put_html('X2')], ['text', '
']0 码力 | 94 页 | 1.71 MB | 1 年前5
PyWebIO v1.2.3 Documentationstart a bmi web service on port 80 ( online Demo [http://pywebio-demos.demo.wangweimin.site/?pywebio_api=bmi] ). If you want to integrate the bmi() service into an existing web framework, you can visit Integration described below, which is different from the traditional web development patton that backend implement api and frontend display content. In PyWebIO, you only need write code in Python. In fact, the way of that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text, put_image, put_table and other functions to output text, pictures, tables and other0 码力 | 119 页 | 7.43 MB | 1 年前3
PyWebIO v1.2.2 Documentationstart a bmi web service on port 80 ( online Demo [http://pywebio-demos.demo.wangweimin.site/?pywebio_api=bmi] ). If you want to integrate the bmi() service into an existing web framework, you can visit Integration described below, which is different from the traditional web development patton that backend implement api and frontend display content. In PyWebIO, you only need write code in Python. In fact, the way of that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text, put_image, put_table and other functions to output text, pictures, tables and other0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.2.3 使用手册start_server(bmi, port=80) 便可以在80端口提供 bmi() 服务( 在线Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=bmi] )。 将 bmi() 服务整合到现有的Web框架请参考 与Web框架集成 。 Documentation 这个文档同时也提供 PDF 和 Epub 格式 [https://readthedocs PyWebIO中,所有的逻辑都通过编写Python代码实现。 你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成 了浏览器。通过PyWebIO提供的命令式API, 你可以简单地调用 put_text 、 put_image 、 put_table 等函数输出文本、图片、表格等内容到浏览器,也可 以调用 input 、 select 、 file_upload 等函数在浏览器上显示不同表单来接收 用 return ('age', 'Age can not be negative!') # Text Output put_text("Hello world!") # Table Output put_table([ ['Commodity', 'Price'], ['Apple', '5.5'], ['Banana', '7'], ]) PyWebIO提供的全部输出函数见0 码力 | 119 页 | 7.44 MB | 1 年前3
PyWebIO v1.2.2 使用手册start_server(bmi, port=80) 便可以在80端口提供 bmi() 服务( 在线Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=bmi] )。 将 bmi() 服务整合到现有的Web框架请参考 与Web框架集成 。 Documentation 这个文档同时也提供 PDF 和 Epub 格式 [https://readthedocs PyWebIO中,所有的逻辑都通过编写Python代码实现。 你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成 了浏览器。通过PyWebIO提供的命令式API, 你可以简单地调用 put_text 、 put_image 、 put_table 等函数输出文本、图片、表格等内容到浏览器,也可 以调用 input 、 select 、 file_upload 等函数在浏览器上显示不同表单来接收 用 return ('age', 'Age can not be negative!') # Text Output put_text("Hello world!") # Table Output put_table([ ['Commodity', 'Price'], ['Apple', '5.5'], PyWebIO提供的全部输出函数见 pywebio.output 模块。另外,PyWebIO还支持0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.1.0 使用手册start_server(bmi, port=80) 便可以在80端口提供 bmi() 服务( 在线Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=bmi] )。 将 bmi() 服务整合到现有的Web框架请参考 与Web框架集成 Documentation 这个文档同时也提供 PDF 和 Epub 格式 [https://readthedocs PyWebIO中,所有的逻辑都通过编写Python代码实现。 你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成 了浏览器。通过PyWebIO提供的命令式API, 你可以简单地调用 put_text 、 put_image 、 put_table 等函数输出文本、图片、表格等内容到浏览器,也可 以调用 input 、 select 、 file_upload 等函数在浏览器上显示不同表单来接收 用 data['age'] <= 0: return ('age', '年龄不能为负数!') # 文本输出 put_text("Hello world!") # 表格输出 put_table([ ['商品', '价格'], ['苹果', '5.5'], ['香蕉', '7'], ]) PyWebIO提供的全部输出函数见 pywebio.output 模块。另外,PyWebIO还支持0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.8.1 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to output text, pictures, tables and other return ('age', 'Age can not be negative!') # Text Output put_text("Hello world!") # Table Output put_table([ ['Commodity', 'Price'], ['Apple', '5.5'], ['Banana', '7'], ]) For all output0 码力 | 160 页 | 7.47 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













