|
@ -889,7 +889,7 @@ while True: |
|
|
**Opens file and returns a corresponding file object.** |
|
|
**Opens file and returns a corresponding file object.** |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|
<file> = open(<path>, mode='r', encoding=None) |
|
|
|
|
|
|
|
|
<file> = open('<path>', mode='r', encoding=None) |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
#### Modes: |
|
|
#### Modes: |
|
@ -951,10 +951,10 @@ b'.\n..\nfile1.txt\nfile2.txt\n' |
|
|
### Path |
|
|
### Path |
|
|
```python |
|
|
```python |
|
|
from os import path, listdir |
|
|
from os import path, listdir |
|
|
<bool> = path.exists(<path>) |
|
|
|
|
|
<bool> = path.isfile(<path>) |
|
|
|
|
|
<bool> = path.isdir(<path>) |
|
|
|
|
|
<list> = listdir(<path>) |
|
|
|
|
|
|
|
|
<bool> = path.exists('<path>') |
|
|
|
|
|
<bool> = path.isfile('<path>') |
|
|
|
|
|
<bool> = path.isdir('<path>') |
|
|
|
|
|
<list> = listdir('<path>') |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|