Skip to content

andyljones/stripcommon

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

A notebook extension to strip common leading whitespace when pasting to Jupyter Notebook cells. That is

    for x in xs:
        f(x)

is pasted as

for x in xs:
    f(x)

This is especially useful when experimenting with code that you're pulling from a module/class/function.

Dev install

jupyter nbextension install stripcommon --symlink --sys-prefix
jupyter nbextension enable stripcommon --sys-prefix

Jupyter will complain that there's an error while loading the extension. It lies. Watch the Chrome console instead.

About

Strips common whitespace when pasting into Jupyter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published