A widget to allow input of a python function, with syntax highlighting.
Project description
widget-code-input
A widget to allow input of a python function, with syntax highlighting.
Try it with Binder !
- Simple usage of the widget code input
- Impact distance of a projectile ( a exmaple for using the widget-code-input for a educational notebook )
Installation
You can install using pip
:
pip install widget_code_input
Or if you use jupyterlab:
pip install widget_code_input
jupyter lab build
If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable the nbextension:
jupyter nbextension enable --py [--sys-prefix|--user|--system] widget_code_input
There are seven different code themes can be chosen. They are "eclipse", "idea", "material", "midnight", "monokai", "nord" and "solarized". You can check the appearance of the code themes at:
https://codemirror.net/demo/theme.html
Acknowledgements
We acknowledge support from the EPFL Open Science Fund via the OSSCAR project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file widget_code_input-3.5.3.tar.gz
.
File metadata
- Download URL: widget_code_input-3.5.3.tar.gz
- Upload date:
- Size: 928.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6ab0c4f497771d76a0ef997a7f0041d34103a89ace333a9c89f58bf6e58b76 |
|
MD5 | cbe230f47dfd4c554b1e7766e8c690a1 |
|
BLAKE2b-256 | 442cc0364a8b9d105eac448a94bba55f67727a579ed753531978221b28d3f6e3 |
File details
Details for the file widget_code_input-3.5.3-py3-none-any.whl
.
File metadata
- Download URL: widget_code_input-3.5.3-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee879aeb2a408819c1fc4282887b07fb93421cc0a2106135f09470ec15cd24f7 |
|
MD5 | d1cc9538cd12826c94578197f581427c |
|
BLAKE2b-256 | d8c951879e6c07b3ae6ef2e7704c9a2640c3b962fd06a2059baf3312a29dde6e |