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....@python.org> On
Behalf Of 2qdxy4rzwzuui...@potatochowder.com
Sent: Friday, March 26, 2021 9:43 PM
To: python-list@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@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

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to