Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Wrote example for %history

Work done as a team by:
-Srinivas Vinay A L
-Vishnu S G
  • Loading branch information...
commit 6685a4d8808e6b51a1e1b70b779d3fcf554f2c28 1 parent 3498382
sgvishnu777 authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 IPython/core/history.py
12 IPython/core/history.py
View
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.