TheProfosist

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

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