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

Bryan bryanjugglercryptographer at yahoo.com
Sat Feb 18 23:05:25 EST 2012


SherjilOzair wrote:
> Has it been considered to add shell features
> to python, such that it can be used as a
> default shell, as a replacement for bash, etc.

I think yes, but rather than become a shell, Python makes easy
programming a shell that can execute Python code. The tendency has
been to excel as a scripting language, and prefer to add extra
features to the standard library.

To start, look at the built-in functions eval() and (raw_)input; and
the library modules: subprocess, os and os.path, glob and re, shutil,
and code.

> I'm sure everyone would agree that doing this
> would make the terminal very powerful.

'Cept of course that they already are.




More information about the Python-list mailing list