[IPython-dev] remove --script?

Matthias BUSSONNIER bussonniermatthias at gmail.com
Fri Oct 25 03:05:18 EDT 2013


Le 24 oct. 2013 à 19:27, davidacoder a écrit :

>> If I remember correctly,
>> This means that will remove script in favor of a more general mechanism
> that
>> would allow to trigger any conversion as save time. Like **always** save
> an
>> static html, or a static .tex --script is awfully restrictive to only py
> files.
>> This mechanism will use nbconvert.
> 
> That sounds great. What I would find even better is if this was a
> per-notebook 
> setting (if that is something that exists), or maybe there could be a magic
> that
> switches this on for the current notebook, or something like that?

Not a magic, but probably, keep in mind, magic live in kernel, ipynb metadata are frontend stuff.
Even if technically it is possible, but it is ugly.
On the other hand, when you send the notebook to someone, you don't want him to 
get theses preferences.

> 
>> And also, notebook are importable thanks to an import hook which is
>> somewhere in IPython, but nobody test it, and nobody maintains it.
>> It is though cleaner than saving the .py file IMHO. Just saying'
> 
> Ha, this is EXACTLY what I need, thanks for pointing me there! For others
> that might be interested, this is in 
> examples/notebooks/Importing Notebooks.ipynb in the ipython repo.
> 
> Is this something that might move from an example to ipython proper
> at some point? I believe this could be incredibly useful for many people.
> Switching it on by default might be a bit intrusive, but maybe there
> could be a magic that enables this?


Probably, if someone take care of it, test it, write doc, 
make it work across notebook format changes... etc.

It would make more sense as a separate package for now that could have monthly releases
with bug fixes.
-- 
M

> Cheers,
> David
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list