A python script editor for napari
A python script editor for napari based on haesleinhuepf's fork of PyQode.
Start the script editor from the menu
Tools > Scripts > Script Editor. Use the auto-completion while typing,
check out the napari tutorials and the
Run button to execute a script.
If you save the script to the folder ".napari-scripts" in your home directory, you will find the script in the
Tools > Scripts menu in napari. You can then also start it from there.
Note: If you have scripts, that might be useful to others, please send them as pull-request to the examples in repository or share them in any other way that suits you.
In case openAI API is installed, you find another button in the script editor to
Enter a prompt in the script editor and click the button. The script editor will send the prompt to
chatGPT and replace it with the answer. For example try entering:
Write Python code for segmenting an image using these steps:
* Apply a Gaussian blur
* Threshold the image using Otsu's method
* Apply connected component labeling
and it will replace it with code accordingly. If it doesn't work in the first attempt, try again. ChatGPT's answers are not always the same.
- Get a python environment, e.g. via mini-conda. If you never used python/conda environments before, please follow the instructions here first.
- Install napari using conda.
conda install -c conda-forge napari
napari-script-editor using pip:
pip install napari-script-editor
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "napari-script-editor" is free and open source software
- Sometimes, the script editor thinks, the file has been changed on disk and asks to reload it.
If you encounter any problems, please file an issue along with a detailed description.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for napari-script-editor-0.2.10.tar.gz
Hashes for napari_script_editor-0.2.10-py3-none-any.whl