Permalink
Browse files

Wrote example for %history

Work done as a team by:
-Srinivas Vinay A L
-Vishnu S G
  • Loading branch information...
1 parent 3498382 commit 6685a4d8808e6b51a1e1b70b779d3fcf554f2c28 @sgvishnu777 committed Dec 18, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 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:

0 comments on commit 6685a4d

Please sign in to comment.