Python File seekable() Method
Example
Check if the file is seekable:
f = open("demofile.txt", "r")
print(f.seekable())
Run Example »
Definition and Usage
The seekable()
method returns
True
if the file is seekable,
False
if not.
A file is seekable if it allows access to the file stream, like the
seek()
method.
Syntax
file.seekable()
Parameter Values
No parameters.
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.