diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-09 03:24:55 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-09 03:24:55 (GMT) |
commit | 1ef24e1b307bab335ba7794915aefc6b92577958 (patch) | |
tree | 3c4af22e498ba5c6c41d3f2deddbb79359b73858 | |
parent | fb1f68ed7cc1536482d1debd70a53c5442135fe2 (diff) | |
download | cpython-1ef24e1b307bab335ba7794915aefc6b92577958.zip cpython-1ef24e1b307bab335ba7794915aefc6b92577958.tar.gz cpython-1ef24e1b307bab335ba7794915aefc6b92577958.tar.bz2 |
Note that when inplace=1 existing backup files will be removed silently.
Closes SF bug #420230.
-rw-r--r-- | Doc/lib/libfileinput.tex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/lib/libfileinput.tex b/Doc/lib/libfileinput.tex index 97caaf9..c66501f 100644 --- a/Doc/lib/libfileinput.tex +++ b/Doc/lib/libfileinput.tex @@ -47,7 +47,9 @@ The following function is the primary interface of this module: inplace\optional{, backup}}}} Create an instance of the \class{FileInput} class. The instance will be used as global state for the functions of this module, and - is also returned to use during iteration. + is also returned to use during iteration. The parameters to this + function will be passed along to the constructor of the + \class{FileInput} class. \end{funcdesc} @@ -118,7 +120,8 @@ module is available for subclassing as well: \strong{Optional in-place filtering:} if the keyword argument \code{\var{inplace}=1} is passed to \function{input()} or to the \class{FileInput} constructor, the file is moved to a backup file and -standard output is directed to the input file. +standard output is directed to the input file (if a file of the same +name as the backup file already exists, it will be replaced silently). This makes it possible to write a filter that rewrites its input file in place. If the keyword argument \code{\var{backup}='.<some extension>'} is also given, it specifies the extension for the backup |