MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / input_control

Function input_control

pywebio/io_ctrl.py:265–280  ·  view source on GitHub ↗

发送input命令,监听事件,验证输入项,返回结果 :param spec: :param preprocess_funcs: keys 严格等于 spec中的name集合 :param item_valid_funcs: keys 严格等于 spec中的name集合 :param onchange_funcs: keys 严格等于 spec中的name集合 :param form_valid_funcs: can be ``None`` :return:

(spec, preprocess_funcs, item_valid_funcs, onchange_funcs, form_valid_funcs=None)

Source from the content-addressed store, hash-verified

263
264@chose_impl
265def input_control(spec, preprocess_funcs, item_valid_funcs, onchange_funcs, form_valid_funcs=None):
266 """
267 发送input命令,监听事件,验证输入项,返回结果
268 :param spec:
269 :param preprocess_funcs: keys 严格等于 spec中的name集合
270 :param item_valid_funcs: keys 严格等于 spec中的name集合
271 :param onchange_funcs: keys 严格等于 spec中的name集合
272 :param form_valid_funcs: can be ``None``
273 :return:
274 """
275 send_msg('input_group', spec)
276
277 data = yield input_event_handle(item_valid_funcs, form_valid_funcs, preprocess_funcs, onchange_funcs)
278
279 send_msg('destroy_form')
280 return data
281
282
283def check_item(name, data, valid_func, preprocess_func, clear_invalid=False):

Callers 2

input_groupFunction · 0.85
single_inputFunction · 0.85

Calls 2

send_msgFunction · 0.85
input_event_handleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…