[IPython-dev] Automatically saving notebooks as scripts has been removed
benjaminrk at gmail.com
Wed Aug 6 17:08:58 EDT 2014
The main reason it is removed is that nbformat had a notion of ‘save as
.py’, which is removed in IPython 3.0 because this functionality has moved
to nbconvert in IPython 1.0. We could, of course, let the appropriate nbconvert
--to python call be implied by --script instead of the removed Python API,
but I don’t think --script was a good idea in the first place.
So it’s not a question of whether to use nbconvert or not - you have to use
nbconvert to get .py files from .ipynb. It’s just a question of whether you
can *automatically* use nbconvert on save via --script. I think if we want
to support this kind of thing, more generic save/rename hooks are better
than a single special-case flag.
On Mon, Aug 4, 2014 at 2:39 PM, Filipe Pires Alvarenga Fernandes <
ocefpaf at gmail.com> wrote:
> Got it. Thanks for looking into this.
> On Mon, Aug 4, 2014 at 6:18 PM, Thomas Kluyver <takowl at gmail.com> wrote:
>> I think we may have been a bit too hasty in getting rid of that. We've
>> been talking about it for a while amongst ourselves, because it doesn't fit
>> terribly neatly into our infrastructure, but we didn't formally deprecate
>> it, and I don't think the alternative approaches are quite as convenient
>> I've put this in the agenda for the dev meeting on Thursday.
>> On 4 August 2014 12:55, Filipe Pires Alvarenga Fernandes <
>> ocefpaf at gmail.com> wrote:
>>> Hello IPython devs,
>>> I was trying the latest github checkout of the IPython source and got
>>> the following message:
>>> Automatically saving notebooks as scripts has been removed.
>>> Use `ipython nbconvert --to python [notebook]` instead.
>>> I am wondering why this had to be removed. Security?
>>> I find the automatic script saving very helpful. My work-group usually
>>> commits the `.ipynb` and the `.py` side-by-side to obtain a better diff. I
>>> know that we can workaround this with nbconvert, but doing that manually is
>>> error prone, and having a script to do that will add another layer of
>>> complexity that we did not have with the automatic conversion.
>>> Well, if the automatic conversion had to go I understand, but if there
>>> is no reason can you guys consider leaving it there?
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>> IPython-dev mailing list
>> IPython-dev at scipy.org
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev