module ipythonhelper.widgets
¶
Short summary¶
module pyquickhelper.ipythonhelper.widgets
To add interactive widgets in a notebook and connect it to Python function, Source: https://github.com/jakevdp/ipywidgets, the module was modified for Python 3 See notebook Having a form in a notebook.
Copyright (c) 2013, Jake Vanderplas All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the {organization} nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Classes¶
class |
truncated documentation |
---|---|
drop down list |
|
radio button |
|
Range (slider) widget The class overloads |
|
Base Class for Static Widgets |
Methods¶
method |
truncated documentation |
---|---|
constructor |
|
|
operator, call method html |
|
operator, call method html |
|
operator, call method html |
operator, call method html |
|
|
operator, call method html |
|
operator, call method html |
|
operator, call method html |
operator, call method html |
|
private |
|
private |
|
|
calls deepcopy |
|
calls deepcopy |
|
calls deepcopy |
calls deepcopy |
|
return HTML string |
|
return HTML string |
|
HTML code |
|
abstract method |
|
|
rename name if name is an attribute |
|
rename name if name is an attribute |
|
rename name if name is an attribute |
rename name if name is an attribute |
|
return all possible values |
|
return all the possible values |
|
Documentation¶
To add interactive widgets in a notebook and connect it to Python function, Source: https://github.com/jakevdp/ipywidgets, the module was modified for Python 3 See notebook Having a form in a notebook.
Copyright (c) 2013, Jake Vanderplas All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the {organization} nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- class pyquickhelper.ipythonhelper.widgets.DropDownWidget(values, name=None, labels=None, default=None, divclass=None, delimiter=' ')[source]¶
Bases:
StaticWidget
drop down list
- Parameters:
values – values for the list
name – name of the object
labels –
?
default – default value
divclass – class for div section
delimiter – delimiter
- __init__(values, name=None, labels=None, default=None, divclass=None, delimiter=' ')[source]¶
- Parameters:
values – values for the list
name – name of the object
labels –
?
default – default value
divclass – class for div section
delimiter – delimiter
- select_html = '<b>{name}:</b> <select name="{name}" onchange="interactUpdate(this.parentNode);"> {options}</select>'[source]¶
template 1
- class pyquickhelper.ipythonhelper.widgets.RadioWidget(values, name=None, labels=None, default=None, divclass=None, delimiter=' ')[source]¶
Bases:
StaticWidget
radio button
- Parameters:
values – values for the list
name – name of the object
labels –
?
default – default value
divclass – class for div section
delimiter – delimiter
- __init__(values, name=None, labels=None, default=None, divclass=None, delimiter=' ')[source]¶
- Parameters:
values – values for the list
name – name of the object
labels –
?
default – default value
divclass – class for div section
delimiter – delimiter
- radio_html = '<input type="radio" name="{name}" value="{value}" {checked} onchange="interactUpdate(this.parentNode);">'[source]¶
template 1
- class pyquickhelper.ipythonhelper.widgets.RangeWidget(min, max, step=1, name=None, default=None, width=350, divclass=None, show_range=False)[source]¶
Bases:
StaticWidget
Range (slider) widget
The class overloads
html
andvalues
.- Parameters:
min – min value
max – max value
step – step
name – name
default – default value
width – width in pixel
divclass – class for div section
show_range – boolean
- __init__(min, max, step=1, name=None, default=None, width=350, divclass=None, show_range=False)[source]¶
- Parameters:
min – min value
max – max value
step – step
name – name
default – default value
width – width in pixel
divclass – class for div section
show_range – boolean
- class pyquickhelper.ipythonhelper.widgets.StaticWidget(name=None, divclass=None)[source]¶
Bases:
object
Base Class for Static Widgets
constructor
- Parameters:
name – name
divclass – class for div section
- __init__(name=None, divclass=None)[source]¶
constructor
- Parameters:
name – name
divclass – class for div section