crazyj7 / ipynb-py-convert

Convert .py files runnable in VSCode or Atom/Hydrogen to Jupyter .ipynb notebooks and vice versa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ipynb-py-convert

Atom/Hydrogen or VSCode/Python allows creating a python files split into cells with # %% separators with the ability to run cells via backend Jupyter session and interactively show results back.

More examples: Jupyter Python VSCode examples, Atom/Hydrogen Getting Started.

ipynb-py-convert python module converts files: .ipynb to .py and .py to .ipynb.

ipynb-py-convert is a fork of the vscode-ipynb-py-converter.

Install

conda install -c defaults -c conda-forge ipynb-py-convert

or

pip install ipynb-py-convert

Example

ipynb-py-convert examples/plot.py examples/plot.ipynb

or

ipynb-py-convert examples/plot.ipynb examples/plot.py

VSCode

Markdown cells are converted to python multiline strings '''. Code cells are left as is. # %% is used by vscode as the cell marker on which 'Run Cell' action is available.

Jupyter ipynb notebook

About

Convert .py files runnable in VSCode or Atom/Hydrogen to Jupyter .ipynb notebooks and vice versa

License:MIT License


Languages

Language:Python 95.5%Language:Shell 4.5%