Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20327
| From | Anh Hai Trinh <anh.hai.trinh@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: ANN: Sarge, a library wrapping the subprocess module, has been released. |
| Date | 2012-02-12 19:57 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <3727311.760.1329105461373.JavaMail.geo-discussion-forums@pbcmg9> (permalink) |
| References | <mailman.5693.1328974297.27778.python-announce-list@python.org> <mailman.5720.1329039680.27778.python-list@python.org> <eb206b4e-e519-4029-9199-e584214de12f@x19g2000yqh.googlegroups.com> <6037825.619.1329060908829.JavaMail.geo-discussion-forums@pbkf5> <58b4a0f8-1a8a-4c02-b6f1-f1baf463eb48@h6g2000yqk.googlegroups.com> |
On Monday, February 13, 2012 3:13:17 AM UTC+7, Vinay Sajip wrote:
> On Feb 12, 3:35 pm, Anh Hai Trinh <anh.hai.tr...@gmail.com> wrote:
>
> > I think most users like to use Python, or they'd use Bash. I think people prefer not another language that is different from both, and having little benefits. My own opinion of course.
> >
>
> I have looked at pbs and clom: they Pythonify calls to external
> programs by making spawning those look like function calls. There's
> nothing wrong with that, it's just a matter of taste. I find that e.g.
>
> wc(ls("/etc", "-1"), "-l")
>
> is not as readable as
>
> call(“ls /etc –1 | wc –l”)
I don't disagree with it. But the solution is really easy, just call 'sh' and pass it a string!
>>> from extproc import sh
>>> n = int(sh(“ls /etc –1 | wc –l”))
No parser needed written!
Yes there is a danger of argument parsing and globs and all that. But people are aware of it. With string parsing, ambiguity is always there. Even when you have a BNF grammar, people easily make mistakes.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-10 11:28 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 01:41 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 01:41 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-12 03:31 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 07:35 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 08:19 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-12 12:21 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-12 12:13 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 19:57 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-13 02:34 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Rick Johnson <rantingrickjohnson@gmail.com> - 2012-02-12 20:26 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Rick Johnson <rantingrickjohnson@gmail.com> - 2012-02-12 20:08 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Anh Hai Trinh <anh.hai.trinh@gmail.com> - 2012-02-12 23:08 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-13 02:59 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-02-17 14:49 +0100
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-17 09:19 -0800
Re: ANN: Sarge, a library wrapping the subprocess module, has been released. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-17 09:29 -0800
csiph-web