SHOW:
|
|
- or go back to the newest paste.
| 1 | - | import os |
| 1 | + | PS E:\> python getDirSize05.py |
| 2 | - | import sys |
| 2 | + | running on dir "." |
| 3 | - | |
| 3 | + | Traceback (most recent call last): |
| 4 | - | def get_size(start_path = '.'): |
| 4 | + | File "getDirSize05.py", line 31, in <module> |
| 5 | - | total_size = 0 |
| 5 | + | listContents(); |
| 6 | - | for dirpath, dirnames, filenames in os.walk(start_path): |
| 6 | + | File "getDirSize05.py", line 24, in listContents |
| 7 | - | for f in filenames: |
| 7 | + | f.write(', ')
|
| 8 | - | fp = os.path.join(dirpath, f) |
| 8 | + | TypeError: a bytes-like object is required, not 'str' |