120
120
121
121
import string
122
122
123
- from pywebio .input import *
124
123
from pywebio .input import parse_input_update_spec
125
124
from pywebio .output import Scope , OutputPosition , Output
126
125
from pywebio .output import _get_output_spec
@@ -147,6 +146,7 @@ def _pin_output(single_input_return, scope, position):
147
146
def put_input (name , type = 'text' , * , label = '' , value = None , placeholder = None , readonly = None , datalist = None ,
148
147
help_text = None , scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
149
148
"""Output an input widget. Refer to: `pywebio.input.input()`"""
149
+ from pywebio .input import input
150
150
check_name (name )
151
151
single_input_return = input (name = name , label = label , value = value , type = type , placeholder = placeholder ,
152
152
readonly = readonly , datalist = datalist , help_text = help_text )
@@ -156,6 +156,7 @@ def put_input(name, type='text', *, label='', value=None, placeholder=None, read
156
156
def put_textarea (name , * , label = '' , rows = 6 , code = None , maxlength = None , minlength = None , value = None , placeholder = None ,
157
157
readonly = None , help_text = None , scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
158
158
"""Output a textarea widget. Refer to: `pywebio.input.textarea()`"""
159
+ from pywebio .input import textarea
159
160
check_name (name )
160
161
single_input_return = textarea (
161
162
name = name , label = label , rows = rows , code = code , maxlength = maxlength ,
@@ -166,6 +167,7 @@ def put_textarea(name, *, label='', rows=6, code=None, maxlength=None, minlength
166
167
def put_select (name , options = None , * , label = '' , multiple = None , value = None , help_text = None ,
167
168
scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
168
169
"""Output a select widget. Refer to: `pywebio.input.select()`"""
170
+ from pywebio .input import select
169
171
check_name (name )
170
172
single_input_return = select (name = name , options = options , label = label , multiple = multiple ,
171
173
value = value , help_text = help_text )
@@ -175,6 +177,7 @@ def put_select(name, options=None, *, label='', multiple=None, value=None, help_
175
177
def put_checkbox (name , options = None , * , label = '' , inline = None , value = None , help_text = None ,
176
178
scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
177
179
"""Output a checkbox widget. Refer to: `pywebio.input.checkbox()`"""
180
+ from pywebio .input import checkbox
178
181
check_name (name )
179
182
single_input_return = checkbox (name = name , options = options , label = label , inline = inline , value = value ,
180
183
help_text = help_text )
@@ -184,6 +187,7 @@ def put_checkbox(name, options=None, *, label='', inline=None, value=None, help_
184
187
def put_radio (name , options = None , * , label = '' , inline = None , value = None , help_text = None ,
185
188
scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
186
189
"""Output a radio widget. Refer to: `pywebio.input.radio()`"""
190
+ from pywebio .input import radio
187
191
check_name (name )
188
192
single_input_return = radio (name = name , options = options , label = label , inline = inline , value = value ,
189
193
help_text = help_text )
@@ -193,6 +197,7 @@ def put_radio(name, options=None, *, label='', inline=None, value=None, help_tex
193
197
def put_slider (name , * , label = '' , value = 0 , min_value = 0 , max_value = 100 , step = 1 , required = None , help_text = None ,
194
198
scope = Scope .Current , position = OutputPosition .BOTTOM ) -> Output :
195
199
"""Output a slide widget. Refer to: `pywebio.input.slider()`"""
200
+ from pywebio .input import slider
196
201
check_name (name )
197
202
single_input_return = slider (name = name , label = label , value = value , min_value = min_value , max_value = max_value ,
198
203
step = step , required = required , help_text = help_text )
0 commit comments