[IPython-user] Fairly deep changes in CVS, testers welcome

Ville Vainio vivainio at kolumbus.fi
Thu Jun 24 07:19:47 CDT 2004

On Mon, Jun 21, 2004 at 01:58:21AM -0600, Fernando Perez wrote:

 > In [6]: PATH='a normal python string'
 > In [7]: echo $PATH
 > a normal python string


 > more realistic environment as a shell.  In particular, I rewrote the
 > readline support so that it's now trivial to define the order of 
 > for tab completion.  The orders are now:

Even cooler. I knew that if I waited long enough, I wouldn't need to unroll
my sleeves ;-).

 > The only really major thing missing from pysh to be usable as a light 
 > (I don't claim it to be in the same league as bash/tcsh) is that all of
 > this magic only applies for single-line statements.  If you want to write
 > multi-line code, you still need to call system() yourself and do your own
 > variable expansions.

Is there a particular reason for this? Couldn't the same expansion routines
be applied to all lines that start with "!" or "!!"? The need for this is
very typical in cases like:

 >>>> !!find . | grep wav

(verify that files are correct)

 >>>> wavs = _

 >>>> for w in wavs:
....   !oggenc $w

Very useful, dont you think? Obviously this is easy to do in bash &
backticks, but I find the pythonic approach much more reliable and flexible.

 > I actually don't see this as a big drawback:  this case is much less
 > common, and if you are already typing multiple lines, being a bit 
 > on exactly what you want is probably a good thing.  I only wanted the

I guess many would like to use ipython specifically to do these kinds of
multiline things where they don't trust bash enough, yet still want to be as
terse as possible without being ambiguous.

More importantly. if there really is no reason to introduce this drawback,
why do it? It's better to go all the way and make bash redundant :-).

 > In particular, @rehash/x are very Unix-specific.  I don't know how to 
 > with $PATH and how to make executability decisions under Windows, 
which (I
 > think) has a baroque extension-based mechanism for this.  If someone else

Why don't you just make some well-known extensions executable? exe, bat,
cmd, py, pl? It's much better than nothing, and works for 99% of the cases.

 > I would very much appreciate feedback, both of success and (hopefully not
 > too much) of problems.  As I said, these ideas forced me to really cut in

I'll try to check it out (literally) after midsummer routines, though my
familiarity with ipython (codebase and in general) possibly isn't good
enough to make informed judgements just yet. Apparently ipython is just now
starting to address my needs, it's just good to see that you have
interest/ambition to invade the shell domain after all :-).

 > places I normally try to stay away from, so there's a chance I could have
 > broken something big.

Well, it needed to be done, so it's going to be worth it.

More information about the IPython-user mailing list