Skip to content

Commit

Permalink
Use --no-wrap in kernel
Browse files Browse the repository at this point in the history
Resolves   #687.
  • Loading branch information
evhub committed Nov 18, 2022
1 parent 9561b6e commit b1915af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ If Coconut is used as a kernel, all code in the console or notebook will be sent

Simply installing Coconut should add a `Coconut` kernel to your Jupyter/IPython notebooks. If you are having issues accessing the Coconut kernel, however, the command `coconut --jupyter` will re-install the `Coconut` kernel to ensure it is using the current Python as well as add the additional kernels `Coconut (Default Python)`, `Coconut (Default Python 2)`, and `Coconut (Default Python 3)` which will use, respectively, the Python accessible as `python`, `python2`, and `python3` (these kernels are accessible in the console as `coconut_py`, `coconut_py2`, and `coconut_py3`). Furthermore, the Coconut kernel fully supports [`nb_conda_kernels`](https://github.com/Anaconda-Platform/nb_conda_kernels) to enable accessing the Coconut kernel in one Conda environment from another Conda environment.

The Coconut kernel will always compile using the parameters: `--target sys --line-numbers --keep-lines --no-wrap`.

Coconut also provides the following convenience commands:

- `coconut --jupyter notebook` will ensure that the Coconut kernel is available and launch a Jupyter/IPython notebook.
Expand Down
3 changes: 2 additions & 1 deletion coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,8 @@ def get_bool_env_var(env_var, default=False):
# INTEGRATION CONSTANTS:
# -----------------------------------------------------------------------------------------------------------------------

coconut_kernel_kwargs = dict(target="sys", line_numbers=True, keep_lines=True)
# must be replicated in DOCS
coconut_kernel_kwargs = dict(target="sys", line_numbers=True, keep_lines=True, no_wrap=True)

icoconut_dir = os.path.join(base_dir, "icoconut")

Expand Down

0 comments on commit b1915af

Please sign in to comment.