Possible Duplicate:
Python equivalent to perl -pe?
Is there a way to process each line of stdin
with a given Python command without setting up things with boilerplate code?
With Perl, I can just do something like:
perl -pe '... command ...'
can I do the same with Python?
Note: something similar is possible with many other tools, e.g. sed, awk, etc...