[Python-checkins] r53125 - python/trunk/Doc/lib/libbz2.tex python/trunk/Doc/lib/libmmap.tex python/trunk/Doc/lib/libstdtypes.tex
andrew.kuchling
python-checkins at python.org
Thu Dec 21 14:40:29 CET 2006
Author: andrew.kuchling
Date: Thu Dec 21 14:40:29 2006
New Revision: 53125
Modified:
python/trunk/Doc/lib/libbz2.tex
python/trunk/Doc/lib/libmmap.tex
python/trunk/Doc/lib/libstdtypes.tex
Log:
Mention the os.SEEK_* constants
Modified: python/trunk/Doc/lib/libbz2.tex
==============================================================================
--- python/trunk/Doc/lib/libbz2.tex (original)
+++ python/trunk/Doc/lib/libbz2.tex Thu Dec 21 14:40:29 2006
@@ -90,10 +90,10 @@
\begin{methoddesc}[BZ2File]{seek}{offset\optional{, whence}}
Move to new file position. Argument \var{offset} is a byte count. Optional
-argument \var{whence} defaults to \code{0} (offset from start of file,
-offset should be \code{>= 0}); other values are \code{1} (move relative to
-current position, positive or negative), and \code{2} (move relative to end
-of file, usually negative, although many platforms allow seeking beyond
+argument \var{whence} defaults to \code{os.SEEK_SET} or \code{0} (offset from start of file;
+offset should be \code{>= 0}); other values are \code{os.SEEK_CUR} or \code{1} (move relative to
+current position; offset can be positive or negative), and \code{os.SEEK_END} or \code{2} (move relative to end
+of file; offset is usually negative, although many platforms allow seeking beyond
the end of a file).
Note that seeking of bz2 files is emulated, and depending on the parameters
Modified: python/trunk/Doc/lib/libmmap.tex
==============================================================================
--- python/trunk/Doc/lib/libmmap.tex (original)
+++ python/trunk/Doc/lib/libmmap.tex Thu Dec 21 14:40:29 2006
@@ -140,8 +140,9 @@
\begin{methoddesc}{seek}{pos\optional{, whence}}
Set the file's current position. \var{whence} argument is optional
- and defaults to \code{0} (absolute file positioning); other values
- are \code{1} (seek relative to the current position) and \code{2}
+ and defaults to \code{os.SEEK_SET} or \code{0} (absolute file
+ positioning); other values are \code{os.SEEK_CUR} or \code{1} (seek
+ relative to the current position) and \code{os.SEEK_END} or \code{2}
(seek relative to the file's end).
\end{methoddesc}
Modified: python/trunk/Doc/lib/libstdtypes.tex
==============================================================================
--- python/trunk/Doc/lib/libstdtypes.tex (original)
+++ python/trunk/Doc/lib/libstdtypes.tex Thu Dec 21 14:40:29 2006
@@ -1678,9 +1678,12 @@
\begin{methoddesc}[file]{seek}{offset\optional{, whence}}
Set the file's current position, like \code{stdio}'s \cfunction{fseek()}.
- The \var{whence} argument is optional and defaults to \code{0}
- (absolute file positioning); other values are \code{1} (seek
- relative to the current position) and \code{2} (seek relative to the
+ The \var{whence} argument is optional and defaults to
+ \code{os.SEEK_SET} or \code{0}
+ (absolute file positioning); other values are \code{os.SEEK_CUR} or \code{1}
+ (seek
+ relative to the current position) and \code{os.SEEK_END} or \code{2}
+ (seek relative to the
file's end). There is no return value. Note that if the file is
opened for appending (mode \code{'a'} or \code{'a+'}), any
\method{seek()} operations will be undone at the next write. If the
More information about the Python-checkins
mailing list