 PyWebIO v1.8.0 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3 PyWebIO v1.8.0 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3
 PyWebIO v1.8.2 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3 PyWebIO v1.8.2 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3
 PyWebIO v1.8.1 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3 PyWebIO v1.8.1 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) When calling show_time() for the first time, a time scope will be created, and the current time will be output to it.0 码力 | 118 页 | 1.40 MB | 1 年前3
 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 137 页 | 1.76 MB | 1 年前3 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 137 页 | 1.76 MB | 1 年前3
 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 137 页 | 1.76 MB | 1 年前3 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 137 页 | 1.76 MB | 1 年前3
 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3 PyWebIO v1.8.2 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3
 PyWebIO v1.8.0 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3 PyWebIO v1.8.0 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3
 PyWebIO v1.8.1 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3 PyWebIO v1.8.1 使用手册from datetime import datetime @use_scope('time', clear=True) def show_time(): put_text(datetime.now()) 第一次调用 show_time 时,将会创建 time 输出域并在其中输出当前时间,之后每次调用 show_time() , 输出域都会被新的内容覆盖。 Scope 支持嵌套。会话开始时,PyWebIO 模式下多线程的使用示例: def show_time(): while True: with use_scope(name='time', clear=True): put_text(datetime.datetime.now()) time.sleep(1) def app(): t = threading.Thread(target=show_time) register_thread(t) put_markdown('## Clock') t.start() # run `show_time()` in background # this thread will cause `SessionNotFoundException` threading.Thread(target=show_time).start() put_text('Background task started.')0 码力 | 135 页 | 1.75 MB | 1 年前3
 PyWebIO v1.8.1 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say as decorator: When calling show_time() for the first time, a time scope will be created, and the current time will be output to it. And then every time the show_time() is called, the new content will0 码力 | 160 页 | 7.47 MB | 1 年前3 PyWebIO v1.8.1 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say as decorator: When calling show_time() for the first time, a time scope will be created, and the current time will be output to it. And then every time the show_time() is called, the new content will0 码力 | 160 页 | 7.47 MB | 1 年前3
 PyWebIO v1.8.2 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say as decorator: When calling show_time() for the first time, a time scope will be created, and the current time will be output to it. And then every time the show_time() is called, the new content will0 码力 | 160 页 | 7.47 MB | 1 年前3 PyWebIO v1.8.2 Documentationoutput functions is called, the content will be output to the browser in real time. The output functions can be called at any time during the application lifetime. Basic Output Using output functions, you until the user submits the form. The output function is used to output content to the browser in real time. The input and output behavior of PyWebIO is consistent with the console program. That’s why we say as decorator: When calling show_time() for the first time, a time scope will be created, and the current time will be output to it. And then every time the show_time() is called, the new content will0 码力 | 160 页 | 7.47 MB | 1 年前3
共 84 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9














