Opened 13 years ago

Closed 13 years ago

#1969 closed defect (duplicate)

ipython -- update to svn to get this new %hist functionality

Reported by: was Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: user interface Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

> Something like %history, but which writes the output to a file.

I just put it in SVN, as the new '-f flag'. This is what it looks like:

In [1]: hist -f foo
File 'foo' exists. Overwrite? n
Aborting.

In [2]: hist
1: _ip.magic("hist -f foo")
2: _ip.magic("hist ")

In [3]: hist -r
1: hist -f foo
2: hist
3: hist -r

In [4]: hist -rn
hist -f foo
hist
hist -r
hist -rn

In [5]: hist -rn -f foo
File 'foo' exists. Overwrite? y

In [6]: !cat foo
hist -f foo
hist
hist -r
hist -rn
hist -rn -f foo

> By the way, %hist still is preparsed in Sage.  I should have fixed
> this long ago.  Could you remind me what you recommended I do?

See above, -r gives you the raw history always, and -n omits line numbers.


Let me know how this works for you.

 -- Fernando

Change History (1)

comment:1 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.1.1 to sage-duplicate/invalid
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate, we did update to ipython 0.8.2.

Cheers,

Michael

Note: See TracTickets for help on using tickets.