summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-19 15:20:29 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-19 15:20:29 (GMT)
commitc3e950cbf3ff3b44999356a046ab5b10a5bc7612 (patch)
tree1cd799401ef6f04d22eadcace2d807af9c905816 /Doc
parentc98eeede175a9a0a6d05b7a6e6b105bcd0fc79fa (diff)
downloadcpython-c3e950cbf3ff3b44999356a046ab5b10a5bc7612.zip
cpython-c3e950cbf3ff3b44999356a046ab5b10a5bc7612.tar.gz
cpython-c3e950cbf3ff3b44999356a046ab5b10a5bc7612.tar.bz2
Clarify how hook_compressed determines how to open a file.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libfileinput.tex5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/lib/libfileinput.tex b/Doc/lib/libfileinput.tex
index 3d70afb..b653429 100644
--- a/Doc/lib/libfileinput.tex
+++ b/Doc/lib/libfileinput.tex
@@ -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)}