PyWebIO v1.3.2 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio pywebio.input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.0 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio pywebio.input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.1 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio pywebio.input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.3 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio pywebio.input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.2.3 Documentationsession To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello, auto also use await to call other coroutines or ( awaitable objects ) in the standard library asyncio: import asyncio from pywebio import start_server async def hello_word(): put_text('Hello ...') await asyncio0 码力 | 92 页 | 1.32 MB | 1 年前3
PyWebIO v1.2.2 Documentationsession To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello, auto also use await to call other coroutines or ( awaitable objects ) in the standard library asyncio: import asyncio from pywebio import start_server async def hello_word(): put_text('Hello ...') await asyncio0 码力 | 92 页 | 1.35 MB | 1 年前3
PyWebIO v1.3.3 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello, auto0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.1 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello, auto0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.0 DocumentationJSONResponse from starlette.routing import Route, Mount from pywebio.platform.fastapi import webio_routes async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[ Route('/' session To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello, auto0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.2.3 Documentationsession To use coroutine-based session, you need to use the async keyword to declare the task function as a coroutine function, and use the await syntax to call the PyWebIO input function: from pywebio.input input import * from pywebio.output import * from pywebio import start_server async def say_hello(): name = await input("what's your name?") put_text('Hello, %s' % name) start_server(say_hello o, auto_open_webbrowser=True) In the coroutine task function, you can also use await to call other coroutines or ( awaitable objects [https://docs.python.org/3/library/asyncio-task.html#asyncio-awaitables]0 码力 | 119 页 | 7.43 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













