Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30662 > unrolled thread
| Started by | Jonathan Hayward <christos.jonathan.hayward@gmail.com> |
|---|---|
| First post | 2012-10-02 16:12 -0700 |
| Last post | 2012-10-05 00:12 -0400 |
| Articles | 6 — 5 participants |
Back to article view | Back to comp.lang.python
Experimental Python-based shell Jonathan Hayward <christos.jonathan.hayward@gmail.com> - 2012-10-02 16:12 -0700
Re: Experimental Python-based shell Tim Roberts <timr@probo.com> - 2012-10-02 22:08 -0700
Re: Experimental Python-based shell Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-03 13:48 +0000
RE: Experimental Python-based shell "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-10-04 22:24 +0000
Re: Experimental Python-based shell Terry Reedy <tjreedy@udel.edu> - 2012-10-03 16:22 -0400
Re: Experimental Python-based shell Terry Reedy <tjreedy@udel.edu> - 2012-10-05 00:12 -0400
| From | Jonathan Hayward <christos.jonathan.hayward@gmail.com> |
|---|---|
| Date | 2012-10-02 16:12 -0700 |
| Subject | Experimental Python-based shell |
| Message-ID | <8646284b-df85-45fe-a793-56b081c6262c@googlegroups.com> |
I've made an experimental Python-based Unix/Linux shell at: http://JonathansCorner.com/cjsh/ An experimental Unix/Linux command line shell, implemented in Python 3, that takes advantage of some more recent concepts in terms of usability and searching above pinpointing files in heirarchies. I invite you to try it. Jonathan Hayward, Jonathan.Hayward@pobox.com, JonathansCorner.com
[toc] | [next] | [standalone]
| From | Tim Roberts <timr@probo.com> |
|---|---|
| Date | 2012-10-02 22:08 -0700 |
| Message-ID | <b0in68pjl0uchq5ip8j1ntir095ja4cicb@4ax.com> |
| In reply to | #30662 |
Jonathan Hayward <christos.jonathan.hayward@gmail.com> wrote:
>
>I've made an experimental Python-based Unix/Linux shell at:
>
>http://JonathansCorner.com/cjsh/
>
>An experimental Unix/Linux command line shell, implemented in Python 3,
>that takes advantage of some more recent concepts in terms of usability
>and searching above pinpointing files in heirarchies.
>
>I invite you to try it.
Without intending to detract from your work in any way, are you familiar
with the IPython project?
http://ipython.org/
You may find some interesting synergy with them.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-10-03 13:48 +0000 |
| Message-ID | <slrnk6oggq.1d3.grahn+nntp@frailea.sa.invalid> |
| In reply to | #30662 |
On Tue, 2012-10-02, Jonathan Hayward wrote: > I've made an experimental Python-based Unix/Linux shell at: > > http://JonathansCorner.com/cjsh/ > > An experimental Unix/Linux command line shell, implemented in Python > 3, that takes advantage of some more recent concepts in terms of > usability and searching above pinpointing files in heirarchies. > > I invite you to try it. Hard to do without a manual page, or any documentation at all except for a tiny "hello world"-style example ... /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | "Prasad, Ramit" <ramit.prasad@jpmorgan.com> |
|---|---|
| Date | 2012-10-04 22:24 +0000 |
| Message-ID | <mailman.1815.1349389515.27098.python-list@python.org> |
| In reply to | #30662 |
(A little quoting manipulation to make it easier to read with
appropriate context.)
> > On Wed, Oct 3, 2012 at 11:25 AM, Amirouche Boubekki <amirouche.boubekki@gmail.com> wrote:
> >
> 2012/10/3 Jonathan Hayward <jonathan.hayward@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
[snip]
> >
> > > 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
Jonathan Hayward wrote:
> 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.
I need more footnotes. :) Does every shell command not have indentation?
How can you tell if the shell command is supposed to be in the loop or after
the loop?
for index in range(10):
# do something
echo %(index)d
Is the above equivalent to Python pseudo-code solution A or B?
Solution A,
for index in range(10):
#do something
Popen('echo', file_path)
Solution B,
for index in range(10):
#do something
Popen('echo', file_path)
How do I make achieve the other solution?
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2012-10-03 16:22 -0400 |
| Message-ID | <mailman.1828.1349400634.27098.python-list@python.org> |
| In reply to | #30662 |
Indexing Python code is ugly. I suggest prefixing non-Python with $. On 10/3/2012 1:24 PM, Jonathan Hayward wrote: > 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. -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2012-10-05 00:12 -0400 |
| Message-ID | <mailman.1836.1349410345.27098.python-list@python.org> |
| In reply to | #30662 |
On 10/3/2012 4:22 PM, Terry Reedy wrote: > Indexing Python code is ugly. I suggest prefixing non-Python with $. Indenting, meaning indenting the Python header lines but not non-Python lines. > On 10/3/2012 1:24 PM, Jonathan Hayward wrote: >> 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. > -- Terry Jan Reedy
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web