Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c51039b4
Commit
c51039b4
authored
Dec 21, 2006
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention the os.SEEK_* constants
parent
0edac0be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
Doc/lib/libbz2.tex
Doc/lib/libbz2.tex
+4
-4
Doc/lib/libmmap.tex
Doc/lib/libmmap.tex
+3
-2
Doc/lib/libstdtypes.tex
Doc/lib/libstdtypes.tex
+6
-3
No files found.
Doc/lib/libbz2.tex
View file @
c51039b4
...
@@ -90,10 +90,10 @@ performance optimizations previously implemented in the
...
@@ -90,10 +90,10 @@ performance optimizations previously implemented in the
\begin{methoddesc}
[BZ2File]
{
seek
}{
offset
\optional
{
, whence
}}
\begin{methoddesc}
[BZ2File]
{
seek
}{
offset
\optional
{
, whence
}}
Move to new file position. Argument
\var
{
offset
}
is a byte count. Optional
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,
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
{
1
}
(move relative to
offset should be
\code
{
>= 0
}
); other values are
\code
{
os.SEEK
_
CUR
}
or
\code
{
1
}
(move relative to
current position
, positive or negative), and
\code
{
2
}
(move relative to end
current position
; offset can be positive or negative), and
\code
{
os.SEEK
_
END
}
or
\code
{
2
}
(move relative to end
of file
,
usually negative, although many platforms allow seeking beyond
of file
; offset is
usually negative, although many platforms allow seeking beyond
the end of a file).
the end of a file).
Note that seeking of bz2 files is emulated, and depending on the parameters
Note that seeking of bz2 files is emulated, and depending on the parameters
...
...
Doc/lib/libmmap.tex
View file @
c51039b4
...
@@ -140,8 +140,9 @@ Memory-mapped file objects support the following methods:
...
@@ -140,8 +140,9 @@ Memory-mapped file objects support the following methods:
\begin{methoddesc}
{
seek
}{
pos
\optional
{
, whence
}}
\begin{methoddesc}
{
seek
}{
pos
\optional
{
, whence
}}
Set the file's current position.
\var
{
whence
}
argument is optional
Set the file's current position.
\var
{
whence
}
argument is optional
and defaults to
\code
{
0
}
(absolute file positioning); other values
and defaults to
\code
{
os.SEEK
_
SET
}
or
\code
{
0
}
(absolute file
are
\code
{
1
}
(seek relative to the current position) and
\code
{
2
}
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).
(seek relative to the file's end).
\end{methoddesc}
\end{methoddesc}
...
...
Doc/lib/libstdtypes.tex
View file @
c51039b4
...
@@ -1678,9 +1678,12 @@ flush the read-ahead buffer.
...
@@ -1678,9 +1678,12 @@ flush the read-ahead buffer.
\begin{methoddesc}
[file]
{
seek
}{
offset
\optional
{
, whence
}}
\begin{methoddesc}
[file]
{
seek
}{
offset
\optional
{
, whence
}}
Set the file's current position, like
\code
{
stdio
}
's
\cfunction
{
fseek()
}
.
Set the file's current position, like
\code
{
stdio
}
's
\cfunction
{
fseek()
}
.
The
\var
{
whence
}
argument is optional and defaults to
\code
{
0
}
The
\var
{
whence
}
argument is optional and defaults to
(absolute file positioning); other values are
\code
{
1
}
(seek
\code
{
os.SEEK
_
SET
}
or
\code
{
0
}
relative to the current position) and
\code
{
2
}
(seek relative to the
(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
file's end). There is no return value. Note that if the file is
opened for appending (mode
\code
{
'a'
}
or
\code
{
'a+'
}
), any
opened for appending (mode
\code
{
'a'
}
or
\code
{
'a+'
}
), any
\method
{
seek()
}
operations will be undone at the next write. If the
\method
{
seek()
}
operations will be undone at the next write. If the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment