A Jupyter kernel for Scilab
Important
---------
This project is a fork from the original `scilab_kernel <https://github.com/Calysto/scilab_kernel>`_.
The goal of forking was to perform an important refactor and improve PEP 8 compliance, but also to
fix a few bugs related to executable path and figure display. Since the original kernel has not been
updated for a few years and it did not work out-of-the-box with the latest version of Scilab, This
was also a personal opportunity to learn a bit more about kernel implementation. There are still
some open ends, specially in command parsing (Jupyter does not have a mimetype JavaScript file for
Scilab language and here we continue using the one from Octave) and the criteria to display figures.
Any help is welcomed!
Prerequisites
-------------
- `Jupyter Notebook <http://jupyter.readthedocs.org/en/latest/install.html>`_
- `Scilab <http://www.scilab.org/download/latest>`_
Installation
------------
pip install kernel_scilab
To use it, run one of:
.. code:: shell
ipython notebook
# In the notebook interface, select Scilab from the 'New' menu
ipython qtconsole --kernel scilab
ipython console --kernel scilab
This kernel is based on `MetaKernel <http://pypi.python.org/pypi/metakernel>`_, which means it
features a standard set of magics. For a full list of magics, run ``%lsmagic`` in a cell.
If Scilab is not added to the ``PATH`` environmental variable, then you need to specify the path
to your Scilab executable by creating a ``SCILAB_EXECUTABLE`` environmental variable. Use the
``scilab-adv-cli`` executable if using a Posix-like OS, and ``WScilex-cli.exe`` if using Windows.
Configuration
-------------
The kernel can be configured by adding an ``kernel_scilab_config.py`` file to the ``jupyter``
config path. The ``ScilabKernel`` class offers ``plot_settings`` as a configurable traits.
The available plot settings are shown in the following snippet.
.. code:: bash
cat ~/.jupyter/kernel_scilab_config.py
c.ScilabKernel.plot_settings = {
"format": "svg",
"backend": "inline",
"size": "600,500",
}
Troubleshooting
---------------
If the kernel is not starting, try running the following from a terminal.
.. code:: bash
python -m kernel_scilab.check
Please include that output if opening an issue.
Advanced Installation Notes
---------------------------
We automatically install a Jupyter kernelspec when installing the python package.
This location can be found using ``jupyter kernelspec list``. If the default location
is not desired, you can remove the directory for the ``kernel_scilab`` kernel, and
install using `python -m kernel_scilab install`.
See ``python -m kernel_scilab install --help`` for available options.
Raw data
{
"_id": null,
"home_page": "https://github.com/WallyTutor/learning-scientific-computing/tree/main/tools/jupyter-kernel-scilab",
"name": "kernel-scilab",
"maintainer": "\"Walter Dal'Maz Silva\"",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "walter.dalmazsilva@gmail.com",
"keywords": "Scientific computing,Computing platform",
"author": "Steven Silvester",
"author_email": "steven.silvester@ieee.org",
"download_url": "https://github.com/WallyTutor/learning-scientific-computing/tools/jupyter-kernel-scilab",
"platform": "Any",
"description": "A Jupyter kernel for Scilab\r\n\r\nImportant\r\n---------\r\nThis project is a fork from the original `scilab_kernel <https://github.com/Calysto/scilab_kernel>`_.\r\nThe goal of forking was to perform an important refactor and improve PEP 8 compliance, but also to\r\nfix a few bugs related to executable path and figure display. Since the original kernel has not been\r\nupdated for a few years and it did not work out-of-the-box with the latest version of Scilab, This\r\nwas also a personal opportunity to learn a bit more about kernel implementation. There are still\r\nsome open ends, specially in command parsing (Jupyter does not have a mimetype JavaScript file for\r\nScilab language and here we continue using the one from Octave) and the criteria to display figures.\r\nAny help is welcomed!\r\n\r\nPrerequisites\r\n-------------\r\n- `Jupyter Notebook <http://jupyter.readthedocs.org/en/latest/install.html>`_\r\n- `Scilab <http://www.scilab.org/download/latest>`_\r\n\r\nInstallation\r\n------------\r\n\r\n pip install kernel_scilab\r\n\r\nTo use it, run one of:\r\n\r\n.. code:: shell\r\n\r\n ipython notebook\r\n # In the notebook interface, select Scilab from the 'New' menu\r\n ipython qtconsole --kernel scilab\r\n ipython console --kernel scilab\r\n\r\nThis kernel is based on `MetaKernel <http://pypi.python.org/pypi/metakernel>`_, which means it \r\nfeatures a standard set of magics. For a full list of magics, run ``%lsmagic`` in a cell.\r\n\r\nIf Scilab is not added to the ``PATH`` environmental variable, then you need to specify the path\r\nto your Scilab executable by creating a ``SCILAB_EXECUTABLE`` environmental variable. Use the \r\n``scilab-adv-cli`` executable if using a Posix-like OS, and ``WScilex-cli.exe`` if using Windows.\r\n\r\nConfiguration\r\n-------------\r\nThe kernel can be configured by adding an ``kernel_scilab_config.py`` file to the ``jupyter``\r\nconfig path. The ``ScilabKernel`` class offers ``plot_settings`` as a configurable traits.\r\nThe available plot settings are shown in the following snippet.\r\n\r\n.. code:: bash\r\n\r\n cat ~/.jupyter/kernel_scilab_config.py\r\n c.ScilabKernel.plot_settings = {\r\n \"format\": \"svg\",\r\n \"backend\": \"inline\",\r\n \"size\": \"600,500\",\r\n }\r\n\r\n\r\nTroubleshooting\r\n---------------\r\nIf the kernel is not starting, try running the following from a terminal.\r\n\r\n.. code:: bash\r\n\r\n python -m kernel_scilab.check\r\n\r\nPlease include that output if opening an issue.\r\n\r\n\r\nAdvanced Installation Notes\r\n---------------------------\r\nWe automatically install a Jupyter kernelspec when installing the python package.\r\nThis location can be found using ``jupyter kernelspec list``. If the default location\r\nis not desired, you can remove the directory for the ``kernel_scilab`` kernel, and\r\ninstall using `python -m kernel_scilab install`. \r\nSee ``python -m kernel_scilab install --help`` for available options.\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Jupyter kernel for Scilab.",
"version": "1.0.3",
"split_keywords": [
"scientific computing",
"computing platform"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a90991f7b29cf7757897e81255bc03dda17844c4082e8db08e087ec7198ada23",
"md5": "2106ae1c092c6a34c9308f73951e7eb3",
"sha256": "22090997719cd76cb07a57d7f21ae14539581eccb7ced5e6d6d60ca257d8fc96"
},
"downloads": -1,
"filename": "kernel_scilab-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2106ae1c092c6a34c9308f73951e7eb3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 26407,
"upload_time": "2023-04-01T08:40:59",
"upload_time_iso_8601": "2023-04-01T08:40:59.101585Z",
"url": "https://files.pythonhosted.org/packages/a9/09/91f7b29cf7757897e81255bc03dda17844c4082e8db08e087ec7198ada23/kernel_scilab-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-01 08:40:59",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "kernel-scilab"
}