Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert jupyter notebook to sphinx gallery notebook styled examples.
@weber-s

This comment has been minimized.

Copy link

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

Hi,

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 :)

@chsasank

This comment has been minimized.

Copy link
Owner Author

@chsasank chsasank commented Jun 25, 2019

Modified!

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.