Metadata-Version: 2.1
Name: csc
Version: 20.2.1
Summary: Run python scripts cell by cell.
Home-page: https://github.com/chmp/csc
Author: Christopher Prohm
Author-email: mail@cprohm.de
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3
Description-Content-Type: text/markdown

# csc - execute scripts one cell at a time

Install with

```bash
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:

```python
#%% Setup
...

#%% Train
...

#%% Save  
...
```


Here each of the `...` stands for arbitrary user defined code. Using
`CellScript` this script can be step by step as:

```python
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
``` 


