Browse Source

Open function

pull/27/head
Jure Šorn 6 years ago
parent
commit
28c49c3e16
1 changed files with 7 additions and 0 deletions
  1. 7
      README.md

7
README.md

@ -897,6 +897,13 @@ while True:
* **`'t'` - Text mode (default).** * **`'t'` - Text mode (default).**
* **`'b'` - Binary mode.** * **`'b'` - Binary mode.**
#### Seek:
```python
<file>.seek(0) # Move to start of the file.
<file>.seek(offset) # Move 'offset' chars/bytes from the start.
<file>.seek(offset, <anchor>) # Anchor: 0 start, 1 current pos., 2 end.
````
#### Read Text from File: #### Read Text from File:
```python ```python
def read_file(filename): def read_file(filename):

Loading…
Cancel
Save