Need help with a program

D'Arcy J.M. Cain darcy at
Fri Jan 29 15:32:52 CET 2010

On Fri, 29 Jan 2010 11:23:54 +0200
Johann Spies <jspies at> wrote:
> I know this is a python list but if you really want to get the job
> done quickly this is one method without writing python code:
> [...]
> $ grep -v 0 /tmp/y > tmp/z

There's plenty of ways to do it without writing Python.  C, C++, Perl,
Forth, Awk, BASIC, Intercal, etc.  So what?  Besides, your solution
doesn't work.  You want "grep -vw 0 /tmp/y > tmp/z" and even then it
doesn't meet the requirements.  It extracts the lines the OP wants but
doesn't reformat them.  It also assumes a Unix system or at least
something with grep installed so it isn't portable.

If you want to see how the same task can be done in many different
languages see

D'Arcy J.M. Cain <darcy at>         |  Democracy is three wolves                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

More information about the Python-list mailing list