Skip to main content

Run python scripts cell by cell.

Project description

csc - execute scripts with cells

Install with

pip install csc

Execution of scripts section by section.

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 Pythn scripts with special cell annotations. For example consider a script to define and train a model:

#%% Setup
...

#%% Train
...

#%% Save  
...

Where 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")

script.run("Setup")
script.run("Train")
script.run("Save")

To list all available cells use script.list().

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.0-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page