Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert jupyter notebook to sphinx gallery notebook styled examples.

This comment has been minimized.

Copy link

@weber-s weber-s commented Apr 30, 2018


This script is very useful! However lots of people now uses magic command such as %matplotlib inline and so, the resulting file is not executable by regular python.

I suggest adding something like:

    python_file = python_file.replace("\n%", "\n# %")

just before the writing of the file, l. 35.

thanks again :)


This comment has been minimized.

Copy link
Owner Author

@chsasank chsasank commented Jun 25, 2019


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.