[IPython-User] Shadow history
Brian Granger
ellisonbg@gmail....
Fri Jan 28 12:18:30 CST 2011
On Thu, Jan 27, 2011 at 10:41 AM, Jorge Scandaliaris
<jorgesmbox-ml@yahoo.es> wrote:
> Jorge Scandaliaris <jorgesmbox-ml <at> yahoo.es> writes:
>
>>
>> Ville M. Vainio <vivainio <at> gmail.com> writes:
>>
>> > Try running "%clear shist_compress" while running with the old shadow
>> > history. This consolidates all entries to one entry, in file
>> > .ipython/db/shadowhist. Then copy over the file to the new ipython
>> > shadow history instance.
>> >
>>
>> Well, I tried to follow your advice, but shadow history doesn't seem to work at
>> all in the current trunk...
>
> There seems to be a simple typo in history.py (diff at bottom of the post), but
> also the magic command %clear doesn't exist anymore? Was it renamed to something
> else?
In what version of IPython? It is still there in trunk?
Brian
> Jorge
>
> ---------
> diff --git a/IPython/core/history.py b/IPython/core/history.py
> index ba13aa5..d56a5ac 100644
> --- a/IPython/core/history.py
> +++ b/IPython/core/history.py
> @@ -409,7 +409,7 @@ def magic_history(self, parameter_s = ''):
>
> found = False
> if pattern is not None:
> - sh = self.shell.history_manager.shadowhist.all()
> + sh = self.shell.history_manager.shadow_hist.all()
> for idx, s in sh:
> if fnmatch.fnmatch(s, pattern):
> print("0%d: %s" %(idx, s.expandtabs(4)), file=outfile)
> --------
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com
More information about the IPython-User
mailing list