Python as a default shell, replacement of bash, sh, cmd ?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Feb 19 09:49:57 CET 2012


On Sun, 19 Feb 2012 00:16:43 -0800, SherjilOzair wrote:

> Well, if not modify python itself, I was thinking of making another
> shell, which borrows a lot from python, something like merging bash and
> python. such that I can do `cd ~/Desktop/dev` and `for i in
> open('file.txt'): print i` at the some shell. This I think would be VERY
> useful.
> 
> IPyhton is very good, but after all, it is just an advanced interpreter,
> not a default shell. I don't want this to run on top of bash or sh. But
> it should run on its own, at shell level.

That's up to your operating system. If your OS lets you choose a shell, 
tell it to use IPython. IPython already supports being used as the system 
shell:

http://ipython.org/ipython-doc/dev/interactive/shell.html
http://transneptune.net/2009/06/16/ipython-as-your-default-shell/

If your OS doesn't support choosing a shell, you can't use anything but 
the built-in shell regardless of what Python does.

Either way, this is not a Python problem to solve. It is an OS issue.


-- 
Steven



More information about the Python-list mailing list