[IPython-user] pysh is in CVS

Ville Vainio vivainio at kolumbus.fi
Mon Jun 28 12:55:41 CDT 2004

Fernando Perez wrote:

> Rather than retype stuff, I'll paste below the pysh help docstring so 
> you can get a feel for the functionality available.  Other than 
> bugfixing, I don't plan on adding any significant features.
> Don't even ask for job control, builting piping, etc.

Don't dismiss job control so quickly ;-).

ipython might even be useful for doing much more "advanced" job control 
that what you typically do with bash:

 >>> !& tail -f output.log

# launched job, "job object" is in jobs[0]

 >>> for line in jobs[0].output():
             if "warning" in line: break

 >>> jobs[0].change_output(open("/dev/null"),"w")

# time passes

 >>> jobs[0].interact()  # output comes back to current terminal

I'm not saying I needed this yesterday, but all this might be handy. And 
it probably wouldn't be too intrusive on ipython codebase itself, much 
of it would probably just be add-on stuff. Throw in some pexpect stuff 
and we have something very interesting...

> To start pysh, simply type 'ipython -p pysh' (you may need to update 
> your .ipython directory).

Yup, pysh seemed to work alright. One thing that is still noticeably 
slower than on bash is changing the directory with "cd" - on a slow 
machine you have enough time to type "ls" and blink an eye before 
ipython shows the prompt again. On a faster machine it's ok, obviously. 
This is true for both "pysh" and plain unconfigured ipython.

More information about the IPython-user mailing list