[IPython-user] Using ipython as a bash replacement
Fernando.Perez at colorado.edu
Tue Mar 23 12:53:05 CST 2004
Jonathan Daugherty wrote:
> I had an idea [and I don't know if it has already been proposed].
> Toward the goal of using ipython in a more shellish context, I think
> it would be really useful if ipython would treat any non-pythonic
> stuff as a shell command; so, if you enter a command or something, and
> it cannot resolve it as something pythonic or magical, perhaps it
> would then default to running it on the system level. So, if I enter
> something like
> In : emacs
> and 'emacs' is not magical and is not in the python namespace, ipython
> might run it as a fallback. I know this might be potentially
> dangerous, but it's just an idea. Any thoughts?
Something like this could be implemented via a profile. Have a look at the
special input processing examples:
However, it will _never_ be the default behavior, since it would potentially
hide python syntax errors from the users. However, the profile mechanism, and
the fact that tha input processing hooks are user-available, makes it possible
to implement this as an optional 'personality' for ipython.
If you get a working profile of this kind, I'll be happy to host it on the
public site. However, I won't work myself in this direction. I am already
way behind with ipython work in terms of bugfixes and core changes which are
directly relevant to its pure python functionality, I simply don't have the
time to compete with bash and tcsh :-)
If you or other users develop such functionality, once it matures I'd be
equally happy to incoroporate it in the distribution (the code has to be LGPL
or Python-license compatible). I say this just to emphasize that I don't
oppose the idea in any way, I simply don't have the resources or interest to
do it myself.
More information about the IPython-user