Run python scripts cell by cell.
Project description
csc - execute scripts one cell at a time
Install with
pip install csc
Sometimes it may be helpful to run individual parts of a script inside an
interactive environment, for example Jupyter Notebooks. CellScript
is designed
to support this use case. The basis are Python scripts with special cell
annotations. For example consider a script to define and train a model:
#%% Setup
...
#%% Train
...
#%% Save
...
Here each of the ...
stands for arbitrary user defined code. Using
CellScript
this script can be step by step as:
from csc import CellScript
script = CellScript("external_script.py")
# List available cells
script.list()
# Execute cells
script.run("Setup")
script.run("Train")
script.run("Save")
# Open a REPL
script.repl()
# Access variables defined in the script namespace
script.ns.variable
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
csc-20.2.1-py3-none-any.whl
(8.8 kB
view hashes)