Advertisement
TheProfosist

Directory Listing with size (no sub folders) via Python 15

Jul 1st, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PS E:\> python getDirSize06.py
  2. running on dir "."
  3. Traceback (most recent call last):
  4.   File "getDirSize06.py", line 31, in <module>
  5.     listContents();
  6.   File "getDirSize06.py", line 23, in listContents
  7.     f.write(str(c.encode('utf8')))
  8. TypeError: a bytes-like object is required, not 'str'
  9. PS E:\>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement