From a87f40578224a0fb1b60c04d3f6dfe26d7bf0e65 2011-02-14 22:47:46 From: Vishnu S G Date: 2011-02-14 22:47:46 Subject: [PATCH] Wrote example for %history Work done as a team by: -Srinivas Vinay A L -Vishnu S G --- diff --git a/IPython/core/history.py b/IPython/core/history.py index ba13aa5..70d85fe 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -347,6 +347,16 @@ 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. + + Example + ------- + + :: + + In [6]: %hist -n 4 6 + 4:a = 12 + 5:print a**2 + """ if not self.shell.displayhook.do_full_cache: