Experimental Python-based shell

Amirouche Boubekki amirouche.boubekki at gmail.com
Wed Oct 3 12:25:32 EDT 2012


2012/10/3 Jonathan Hayward <jonathan.hayward at pobox.com>

> The chief benefit besides the searching, so far, is that you can use Py3k
> mixed with shell commands as the scripting language--so script in Python
> instead of bash.
>
> When using Python for scripting, Python lines are indented by an extra tab
> (or four spaces) while shell-like commands are not indented. So:
>
> cjsh>     for index in range(10):
> ----> echo %(index)d
> ---->
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
>
> Echo could (and maybe should) be a built-in, but it isn't. The output is
> os.system()'ed to bash, which echoes based on a command that includes the
> value of a Python variable. The implementation is a bit crude, but it is
> reasonably powerful.
>
> I have other things on the agenda, like making it able to run scripts and
> doing fuzzy matching, but for now those are the main two attractions.
>

Is it possible to drop completly the bash syntax and use some python
library (I saw it on github) that wraps bash commands with python functions
or the other around making it possible to call python functions with a
bash-like syntax. The syntax you are talking about seems strange.

Regards,

Amirouche
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20121003/df2f4cfa/attachment.html>


More information about the Python-list mailing list