Skip to content

Loading…

Doc magic history #218

Closed
wants to merge 1 commit into from

2 participants

@sgvishnu777

Added example for %history -n as a part of Scipy Sprint

@sgvishnu777 sgvishnu777 Wrote example for %history
Work done as a team by:
-Srinivas Vinay A L
-Vishnu S G
6685a4d
@takluyver
IPython member

I've combined this pull request into #272.

@takluyver takluyver referenced this pull request
Merged

Magic examples #272

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 18, 2010
  1. @sgvishnu777

    Wrote example for %history

    sgvishnu777 committed
    Work done as a team by:
    -Srinivas Vinay A L
    -Vishnu S G
Showing with 12 additions and 0 deletions.
  1. +12 −0 IPython/core/history.py
View
12 IPython/core/history.py
@@ -294,6 +294,18 @@ def magic_history(self, parameter_s = ''):
-f FILENAME: instead of printing the output to the screen, redirect it to
the given file. The file is always overwritten, though IPython asks for
confirmation first if it already exists.
+
+ Examples
+ --------
+ This example demonstrates the functionality of the command %history -n
+
+ In [4]: history -n
+ 1 :
+ ls
+ 2 :
+ x = 10
+ 3 :
+ print x
"""
if not self.shell.displayhook.do_full_cache:
Something went wrong with that request. Please try again.