[IPython-dev] Windows fixes, new prompts in CVS, testers?

Fernando Perez fperez at colorado.edu
Tue Jun 8 01:42:58 CDT 2004


Hi all,

I've made a bunch of changes which are now in CVS, and I'd very much
appreciate some third-party feedback from the willing.

Some highlights:

(1) Windows support _should_ now work out-of-the box for those having Gary's
readline.  He helped me with this, and says it works for him now.  Please let
me know of any problems, with as much detail as possible (also say so if it
works!)

(2) New bash-like prompts, arbitrary coloring of prompts, and a 'shell'
profile.  Yes, this is ipython:

planck[~]> ipython -p shell
Python 2.3.3 (#1, May  7 2004, 10:31:40)
Type "copyright", "credits" or "license" for more information.

IPython 0.6.1.cvs -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
@magic  -> Information about IPython's 'magic' @ functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

IPython profile: shell

Welcome to pysh, a set of extensions to IPython for shell usage.
      help(shell)  -- help on the installed shell extensions.
fperez at planck[~]> cd test
fperez at planck[~/test]> !!ls d*
                     <2> ['die.py', 'divc', 'div.c', 'divf', 'div.f', 'div.py']
fperez at planck[~/test]> for f in _2:
....................:     info = getoutput('ls -l %s' % f)
....................:     print 'File details:',f,'->',info
....................:
File details: die.py -> -rw-r--r--  1 fperez wavelet 124 Oct  6  2003 die.py
File details: divc -> -rwxr-xr-x  1 fperez wavelet 9988 Jul  7  2003 divc
File details: div.c -> -rw-r--r--  1 fperez wavelet 196 Jul  7  2003 div.c
File details: divf -> -rwxr-xr-x  1 fperez wavelet 11671 Jul  7  2003 divf
File details: div.f -> -rw-r--r--  1 fperez wavelet 237 Jul  7  2003 div.f
File details: div.py -> -rw-r--r--  1 fperez wavelet 49 May 12  2002 div.py


This is just to give you a simple example of the functionality.  None of this
is in the manual yet, so you'll have to look into IPython/UserConfig for the
profile (ipythonrc-shell) and associated pysh.py files.  Just copy these to
your ~/.ipythonrc directory.

The allowed prompt escapes are mainly the ones in bash, with some additions.
See the Prompts.py code for details (I'll document it later).  This code stems
from a contribution by W.J. van der Laan <gnufnork at hetdigitalegat.nl>, many
thanks to him.

Best,

f





More information about the IPython-dev mailing list