Created
December 4, 2018 08:16
-
-
Save DonBattery/559503c8b0f98f04bc628cfcda60daed to your computer and use it in GitHub Desktop.
read lines from stdin (or pipe) and process them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import fileinput | |
def process(line): | |
print(line) | |
for line in fileinput.input(): | |
process(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment