Helium is a package for Sublime Text, which provides in-editor code execution and autocomplete in interaction with Jupyter kernels. The concept of an editor extension communicating Jupyter kernels is inspired by @nteract's splendid Atom package Hydrogen. I want something like it in Sublime Text, too.
Any feedback is highly welcome. I hope this package will help your life with ST3!
Now this package is under the package control channel!
You can install it with Package Control plugin, run Package Control: Install Package
, then choose Helium
from the package list.
Helium: connect kernel
command.New kernel
.Helium: connect kernel
command.%connect_info
magic.)Helium: connect kernel
command.New kernel
.(Enter connection info)
.Python kernel installed via Conda is not found by Jupyter by default. You should add the path to kernel into the jupyter_path
entry of the config file.
Execute code by Helium: Execute Block
(whose command name is helium_execute_block
).
Regions surrounded by # %%
or # <codecell>
(you can configure it in cell_delimiter_pattern
option item) are considered as "code cells".
You can execute a region by Helium: Execute cell
(helium_execute_cell
) or Helium: Execute Cell and Move
command.
Each cell has a clickable "Run Cell" phantom that appears next to the cell markers to run the cell.
Get Object Inspection by Helium: Get Object Inspection
(whose command name is helium_get_object_inspection
).
You should be able to get autocomplete from the kernel from the time you connected. If you don't want autocomplete, set "complete"
as false
in setting file.
You can restart, shutdown, and interrupt process via Helium: Restart Kernel
, Helium: Shutdown Kernel
, Helium: Interrupt Kernel
commands.
You can also run these command as a submenu of Helium: List Kernels
command.
We can execute code, retrieve results including images, get completions and object inspections by the Jupyter protocol regardless of the interpreter implementation of languages if it has Jupyter kernel. If we try to do that by directly running interpreters there should be several interpreter-specific problems, but we can entrust the kernel maintainers on language-specific problems by using Jupyter.
I admit Jupyter Notebook is a powerful tool for instantly sharing small analysis work, exploring data or APIs, or making executable tutorials. Yes, I often use it, too.
However, in my opinion, it is not suited for projects with large code bases.
I want to jumpt across files instantly, make modules organized (not saved as .ipynb
s), kick scripts with various parameters, and make project code more reusable and reproducible... but still I want to edit them with interactive feedback.