convert script awk in python

Avi Gross avigross at verizon.net
Fri Mar 26 22:56:40 EDT 2021


	https://docs.python.org/3/library/fileinput.html

Dan,

Yes, fileinput sounds like what I described and more. It does indeed seem
to emulate the interface in programs like AWK including using "-" as a
placeholder for standard input. Now all you need is to have it also do the
split!

∀vi ∃. Grθß

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net at python.org> On
Behalf Of 2QdxY4RzWzUUiLuE at potatochowder.com
Sent: Friday, March 26, 2021 9:43 PM
To: python-list at python.org
Subject: Re: convert script awk in python

On 2021-03-26 at 21:06:19 -0400,
Avi Gross via Python-list <python-list at python.org> wrote:

> A generator that opens one file at a time (or STDIN) in a consistent 
> manner, would be a reasonable thing to have as part of emulating AWK.

https://docs.python.org/3/library/fileinput.html
--
https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list