PyWebIO v1.5.2 Documentationadd(cnt): cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, ˓→ cnt)]) Of course aiohttp.web.WebSocketResponse. For details, please refer: https://docs.aiohttp. org/en/stable/web_reference.html#websocketresponse • aiohttp_settings – Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application The rest arguments of start_server() have the same meaning as for pywebio.platform0 码力 | 108 页 | 1.37 MB | 1 年前3
PyWebIO v1.5.0 Documentationadd(cnt): cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, ˓→ cnt)]) Of course aiohttp.web.WebSocketResponse. For details, please refer: https://docs.aiohttp. org/en/stable/web_reference.html#websocketresponse • aiohttp_settings – Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application The rest arguments of start_server() have the same meaning as for pywebio.platform0 码力 | 108 页 | 1.37 MB | 1 年前3
PyWebIO v1.5.1 Documentationadd(cnt): cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, ˓→ cnt)]) Of course aiohttp.web.WebSocketResponse. For details, please refer: https://docs.aiohttp. org/en/stable/web_reference.html#websocketresponse • aiohttp_settings – Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application The rest arguments of start_server() have the same meaning as for pywebio.platform0 码力 | 108 页 | 1.37 MB | 1 年前3
PyWebIO v1.5.2 使用手册(下页继续) 4.4. pywebio.session —会话相关 55 PyWebIO, 发布 1.5.2 (续上页) cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, �→ cnt)]) 当然,还可以通过函数闭包来实现相同的功能: aiohttp. web.WebSocketResponse. For details, please refer: https://docs.aiohttp.org/en/stable/ web_reference.html#websocketresponse • aiohttp_settings –Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application 剩余参数的详细说明见pywebio.platform.tornado.start_server() 的同名参数。 FastAPI/Starlette support0 码力 | 125 页 | 1.72 MB | 1 年前3
PyWebIO v1.5.0 使用手册(下页继续) 4.4. pywebio.session —会话相关 55 PyWebIO, 发布 1.5.0 (续上页) cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, �→ cnt)]) 当然,还可以通过函数闭包来实现相同的功能: aiohttp. web.WebSocketResponse. For details, please refer: https://docs.aiohttp.org/en/stable/ web_reference.html#websocketresponse • aiohttp_settings –Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application 剩余参数的详细说明见pywebio.platform.tornado.start_server() 的同名参数。 FastAPI/Starlette support0 码力 | 125 页 | 1.72 MB | 1 年前3
PyWebIO v1.5.1 使用手册(下页继续) 4.4. pywebio.session —会话相关 55 PyWebIO, 发布 1.5.1 (续上页) cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, �→ cnt)]) 当然,还可以通过函数闭包来实现相同的功能: aiohttp. web.WebSocketResponse. For details, please refer: https://docs.aiohttp.org/en/stable/ web_reference.html#websocketresponse • aiohttp_settings –Additional keyword arguments passed to the constructor of aiohttp.web.Application. For details, please refer: https://docs.aiohttp.org/en/ stable/web_reference.html#application 剩余参数的详细说明见pywebio.platform.tornado.start_server() 的同名参数。 FastAPI/Starlette support0 码力 | 125 页 | 1.72 MB | 1 年前3
PyWebIO v1.6.2 Documentationfield with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list) value of the expression is a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, cnt)]) Of course0 码力 | 148 页 | 7.46 MB | 1 年前3
PyWebIO v1.5.1 Documentationfield with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list) value of the expression is a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, cnt)]) Of course0 码力 | 144 页 | 7.46 MB | 1 年前3
PyWebIO v1.6.1 Documentationfield with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list) value of the expression is a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, cnt)]) Of course0 码力 | 148 页 | 7.46 MB | 1 年前3
PyWebIO v1.6.3 Documentationfield with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list) value of the expression is a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of cnt[0] += 1 def show(cnt): put_text(cnt[0]) def main(): cnt = [0] # Trick: to pass by reference put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), partial(show, cnt)]) Of course0 码力 | 150 页 | 7.46 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













