Skip to content

Strips common whitespace when pasting into Jupyter

Notifications You must be signed in to change notification settings

andyljones/stripcommon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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