Spyder script to IPhython Notebook converter ?

1,534 views
Skip to first unread message

egayer

unread,
Oct 13, 2015, 4:05:36 AM10/13/15
to spyder
Hi all, 

As a spyder user I love all the small features provided by this awesome tool that makes my coding super easy. I use spyder as my default IDE but I recently looked at / played around with IPython Notebook and find it super attractive as well and especially for teaching purpose (I use it for my teaching presentations).

However because I feel better using spyder, I was wondering if there was some kind of a tool somewhere that could convert python script into IPython Notebook so I could just use it to generate some IPython Notebook from old scripts. Looking around I found these two related questions/answers :
 


It is not that these two options are not satisfying to me (and please forgive my naivety on this purpose), but I was wondering if it could be possible to convert/export a script written in spyder into a IPython Notebook, using for example the cells delimiter (##%) to delimit IPython Notebook cells and the comment (#) for text cells in the IPython Notebook.

Again I have no idea about how much work it would take to make such a converter, but I am just asking because it would make coding AND presentations preparation super easy to me.

Thanks
Eric


PS : The ultimate goal being to find a efficient way to prep my teaching using python to generate htlm5 presentations because I am fed up to literally loose time preping presentations with powerpoint/keynote stuff 

Carlos Córdoba

unread,
Oct 13, 2015, 11:09:41 AM10/13/15
to spyd...@googlegroups.com
Hi Eric,

Glad to hear you're enjoying using Spyder :-)

About your question: unfortunately we don't have any such tool in Spyder (for now :-). We could create something like that in the future, but right now we're very busy working on Spyder 3.0.


Cheers,
Carlos

El 13/10/15 a las 03:05, egayer escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

egayer

unread,
Oct 14, 2015, 3:33:18 AM10/14/15
to spyder
Hi Carlos, 

Thanks for your answer, my post was also to throw an idea... if such a tool looks useful for more than one user maybe you would think about adding it directly into Spyder
Anyway thanks again for the answer
Eric

Kris Thielemans

unread,
Sep 26, 2017, 11:05:06 AM9/26/17
to spyder
Hi

I found this old post, and Ihave exactly the same motivation as Eric. We have a set if spyder notebooks but want to be able to let our students use
jupyter notebooks as well. Ideally we have a single source and can convert from on to the other. Does anyone know of a tool that does this now? It might not be so difficult to create, see e.g.
https://gist.github.com/fperez/9716279

thanks
Kris

Romain Jouin

unread,
Aug 22, 2019, 4:41:05 AM8/22/19
to spyder
Hi,

I have the exact same need for a spyder -> ipynb converter, any news ? 

Fergal Mullally

unread,
Aug 29, 2019, 5:01:09 AM8/29/19
to spyd...@googlegroups.com
Dear Romain Jouin,

I wrote a silly script to convert .py files to .ipynb files and back
againa while back.

https://sourceforge.net/projects/juplicate/

I never used it much, so I'm sure there's all sorts of edge cases I
didn't think about, but you may find it useful.


Fergal
> To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/68ec1daa-62e1-4736-9818-be539abc2b78%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages