Experimental Python-based shell
jonathan.hayward at pobox.com
Wed Oct 3 19:24:51 CEST 2012
I am open to suggestions and patches. I don't think the syntax strange,
though: it offers a clear and distinct way to differentiate Python and
shell commands, and shell commands can access Python variables when
specified. And it is a simple rule, without footnotes needed.
On Wed, Oct 3, 2012 at 11:25 AM, Amirouche Boubekki <
amirouche.boubekki at gmail.com> wrote:
> 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
>> 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.
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.
*Amazon <http://amazon.com/author/cjshayward>* • Author
• *Email <christos.jonathan.hayward at gmail.com>* •
• Google Plus <http://jonathanscorner.com/plus> •
* • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
* • Twitter <http://twitter.com/JonathansCorner> •
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site. *See one page of my website! <http://random.jonathanscorner.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list