[Tutor] Regex parsing and writing to file
Kent Johnson
kent37 at tds.net
Thu Oct 18 15:00:45 CEST 2007
jon vspython wrote:
> Cool! It works :-)
>
> But I don't get it. Where is the redirection?
The fileinput module redirects stdout when you use inplace=1. See the
section "Optional in-place filtering" here:
http://docs.python.org/lib/module-fileinput.html
You can read the source to fileinput (Lib/fileinput.py) if you want to
see the details of how this works.
Kent
More information about the Tutor
mailing list