Merge lp://staging/~duke-eml/ipython/ipython-saveappend into lp://staging/ipython

Proposed by Marmaduke Woodman
Status: Needs review
Proposed branch: lp://staging/~duke-eml/ipython/ipython-saveappend
Merge into: lp://staging/ipython
Diff against target: 31 lines (+8/-4)
1 file modified
IPython/core/magic.py (+8/-4)
To merge this branch: bzr merge lp://staging/~duke-eml/ipython/ipython-saveappend
Reviewer Review Type Date Requested Status
Curtis Hovey (community) Abstain
Review via email: mp+46268@code.staging.launchpad.net

Description of the change

I have made a small change to allow the magic_save function to append to an existing file rather than overwrite it.

In using IPython, I often would like to build up a file gradually from the command line history, and the default behavior of overwriting existing files makes this difficult, hence the modification.

I haven't written any tests because I don't know how to put one in the testing framework, but in principle, the test would involve reading an existing file, running magic_save, then checking the file to see that the intended lines were appended correctly.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) :
review: Abstain
Revision history for this message
Thomas Kluyver (takluyver) wrote :

Note that all IPython development is now on Github - this is just Launchpad importing the branch from git.

Unmerged revisions

1370. By Marmaduke Woodman

In the magic function 'save', when the file exists, instead of
overwriting, the option to append has been added.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches