[IPython-dev] No release this weekend, & UsageError

Fernando Perez fperez.net at gmail.com
Sat Sep 8 21:17:42 EDT 2007

On 9/8/07, Ville M. Vainio <vivainio at gmail.com> wrote:
> On 9/8/07, Ville M. Vainio <vivainio at gmail.com> wrote:
> > In a macro/batch file execution this would interrupt the execution,
> > but they still won't warrant showing the full traceback to the user in
> > interactive session (this is when just showing the error string is
> > enough).
> So here's what it looks like now (in svn):
> [Q:/ipython]|37> pushd
>             <37> ['Q:\\ipython']
> [Q:/ipython]|38> cd /
> [Q:/]|39> popd
> popd -> Q:\ipython
> [Q:/ipython]|40> popd
> UsageError: %popd on empty stack
> [Q:/ipython]|41>
> I'm not opposed to adding the previous style pushd/popd to
> ipy_legacy.py if backwards compatibility is needed, but the current
> implementation is less surprising and the only special case is popping
> an empty stack.

As I mentioned elsewhere, let's instead make sure we provide
*nix-compatible behavior.      Having pushd/popd/dirs do one thing in
the shell and a different one in ipython is really not a good  idea.
People are used to the existing behavior for years and they continue
to have it in their shells, so incompatible behavior in ipython will
just cause confusion.



More information about the IPython-dev mailing list