]> granicus.if.org Git - python/commitdiff
Clarify how hook_compressed determines how to open a file.
authorGeorg Brandl <georg@python.org>
Sun, 19 Feb 2006 15:20:29 +0000 (15:20 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 19 Feb 2006 15:20:29 +0000 (15:20 +0000)
Doc/lib/libfileinput.tex

index 3d70afbc93d02db626475522c89b6755de876ca2..b653429bb370a1e63ed0d09b59ab865b9c2cc944 100644 (file)
@@ -165,8 +165,9 @@ filtering is disabled when standard input is read.
 The two following opening hooks are provided by this module:
 
 \begin{funcdesc}{hook_compressed}{filename, mode}
-  Transparently opens files compressed with gzip and bzip2 using
-  the \module{gzip} and \module{bz2} modules.
+  Transparently opens files compressed with gzip and bzip2 (recognized
+  by the extensions \code{'.gz'} and \code{'.bz2'}) using the \module{gzip}
+  and \module{bz2} modules as well as normal files.
 
   Usage example: 
   \samp{fi = fileinput.FileInput(openhook=fileinput.hook_compressed)}