Overview:
- The method tell() of the TextIOWrapper class returns the position of the stream pointer in the underlying buffer.
Example:
The Python example uses the obtained stream pointer later while restarting the write operation at the end of the buffer.
|
# Example Python program that obtains the # Using TextIOWrapper write to a buffer # Store the current position in the stream # Reset the stream position # Read contents # Go to the previous stream position # Read from the beginning |
Output:
| 26 This is a simple sentence. This is a simple sentence.This is not a complex sentence. |