PyWebIO v1.2.3 Documentationput_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a very simple script if you ignore PyWebIO, but after using the input start 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 of0 码力 | 119 页 | 7.43 MB | 1 年前3
PyWebIO v1.2.2 Documentationput_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a very simple script if you ignore PyWebIO, but after using the input start 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 of0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v0.3.0 使用手册put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 如果没有使用PywWebIO,这只是一个非常简单的脚本,而通过使用 PywWebIO提供的输入输出函数,你可以在浏览器中与代码进行交互: 将上面代码最后一行对 bmi() MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") if __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), (r"/tool/io", /io API与后端进行通讯。 例如你将PyWebIO静态文件托管到 /A/B/C/(.*) 路径下,那么你需要将 PyWebIO API的路由绑定到 /A/B/C/io 处; 你也可以在PyWebIO前端页面使用 pywebio_api Url参数来指定PyWebIO后端API地址, 例如 /A/B/C/? pywebio_api=/D/pywebio 将PyWebIO后端API地址设置到了0 码力 | 72 页 | 8.55 MB | 1 年前3
PyWebIO v1.0.3 使用手册put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 如果没有使用PyWebIO,这只是一个非常简单的脚本,而通过使用PyWebIO提 供的输入输出函数,你可以在浏览器中与代码进行交互: 将上面代码最后一行对 bmi() 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_upload0 码力 | 106 页 | 7.34 MB | 1 年前3
PyWebIO v1.2.3 使用手册put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 如果没有使用PyWebIO,这只是一个非常简单的脚本,而通过使用PyWebIO提 供的输入输出函数,你可以在浏览器中与代码进行交互: 将上面代码最后一行对 bmi() 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_upload0 码力 | 119 页 | 7.44 MB | 1 年前3
PyWebIO v1.2.2 使用手册put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 如果没有使用PyWebIO,这只是一个非常简单的脚本,而通过使用PyWebIO提 供的输入输出函数,你可以在浏览器中与代码进行交互: 将上面代码最后一行对 bmi() 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_upload0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v0.3.0 使用手册top_status: if BMI <= top: put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 7 PyWebIO, 发布 0.3.0 如果没有使用 PywWebIO,这只是一个非常简单的脚本,而通过使用 PywWebIO 提供的输入输出函数,你可 以在浏览器中与代码进行交互: MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") if __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), (r"/tool/io", webio_handler(task_func)) 默认通过当前页面的同级的 ./io API 与后端进行通讯。 例如你将 PyWebIO 静态文件托管到 /A/B/C/(.*) 路径下,那么你需要将 PyWebIO API 的路由绑定到 /A/ B/C/io 处;你也可以在 PyWebIO 前端页面使用 pywebio_api Url 参数来指定 PyWebIO 后端 API 地址,例 如 /A/B/C/?pywebio_api=/D/pywebio 将0 码力 | 70 页 | 1.41 MB | 1 年前3
PyWebIO v1.1.0 使用手册put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status)) break if __name__ == '__main__': bmi() 如果没有使用PyWebIO,这只是一个非常简单的脚本,而通过使用PyWebIO提 供的输入输出函数,你可以在浏览器中与代码进行交互: 将上面代码最后一行对 bmi() 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_upload0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.8.1 Documentationput_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a very simple script if you ignore PyWebIO, but after using the input described 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 like writing a console program, except 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 to0 码力 | 160 页 | 7.47 MB | 1 年前3
PyWebIO v1.8.2 Documentationput_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a very simple script if you ignore PyWebIO, but after using the input described 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 like writing a console program, except 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 to0 码力 | 160 页 | 7.47 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













