Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12815

Re: One line command line filter

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Tue, 06 Sep 2011 02:09:37 -0500
Newsgroups comp.lang.python
Subject Re: One line command line filter
References <4725b2c3-d930-4fb0-9fe7-a286d150f9c5@d18g2000yqm.googlegroups.com>
From John Wiegley <jwiegley@gmail.com>
Date Tue, 06 Sep 2011 01:51:17 -0500
Message-ID <m24o0q410a.fsf@gmail.com> (permalink)
User-Agent Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin)
Cancel-Lock sha1:iHoxNhyIbF2GGk2F9UZ0/k5dQFM=
MIME-Version 1.0
Content-Type text/plain
Lines 14
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-xWd2eNmGj1IG7yH9nDjqZ8aWT8c41PONatD+wOD3Z2n0WussDvdBJwX8RBQIq1C5bLGNeIUBNN45WX7!qYeowvYDZkHdiOFjEf8OY3Cj7OIWeqiN1egIYXmNjY0BAVh9
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1374
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12815

Show key headers only | View raw


>>>>> Jon Redgrave <jredgrave@capisco.com> writes:

> It seems unreasonably hard to write simple one-line unix command line
> filters in python:

> eg: ls | python -c "<something> print x.upper()"

[...]

> Is there a better solution - if not is this worth a PEP?

Have you looked at PyP (http://code.google.com/p/pyp)?

John

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

One line command line filter Jon Redgrave <jredgrave@capisco.com> - 2011-09-05 13:38 -0700
  Re: One line command line filter Thomas Jollans <t@jollybox.de> - 2011-09-05 22:47 +0200
    Re: One line command line filter Jon Redgrave <jredgrave@capisco.com> - 2011-09-05 14:32 -0700
      Re: One line command line filter Terry Reedy <tjreedy@udel.edu> - 2011-09-05 19:02 -0400
  Re: One line command line filter Terry Reedy <tjreedy@udel.edu> - 2011-09-05 18:21 -0400
    Re: One line command line filter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-09-06 09:18 +1000
      Re: One line command line filter Terry Reedy <tjreedy@udel.edu> - 2011-09-05 21:25 -0400
      Re: One line command line filter Hans Mulder <hansmu@xs4all.nl> - 2011-09-06 13:15 +0200
  Re: One line command line filter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-09-06 09:29 +1000
  Re: One line command line filter John Wiegley <jwiegley@gmail.com> - 2011-09-06 01:51 -0500
  Re: One line command line filter Peter Otten <__peter__@web.de> - 2011-09-06 09:53 +0200

csiph-web