[IPython-user] Notes on using ipython as a system shell ('pysh')
Fernando Perez
fperez at colorado.edu
Tue Apr 20 01:51:31 CDT 2004
Arnd Baecker wrote:
> Hi,
>
>
>>Also can pipes be handled?
>>
>> >> ps uax | grep ipython | sort > /tmp/ps
>
>
> just in case: maybe the recent recipe
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/276960
> on shell-like data processing in the python cookbook is
> of any use here ?
It's an interesting recipe (a beautiful hack, I'd add), but it requires
implementing the __ror__ method for every command one wishes to support. If
we simply pass things to the shell below, that's automatically taken care of
for us, and it will apply to any command which happens to exist on the system.
So I don't see it as something that we should necessarily focus on, at least
at the beginning. But for scripting convenience when using python, it would
not hurt to wrap at least some of the more useful shell commands in
lightweight proxies which enable this functionality.
I'll certainly keep the idea in the bag for the whole project, so I can remind
you of it when you are ready to push pysh out the door ;-)
Best,
F.
More information about the IPython-user
mailing list