Note: Please only use python standard libraries covered in class lectures (i.e. json, csv, urllib etc). Other libraries such as pandas, numpy are *not* allowed in your work.

1 answer below »
Please see instructions in attached document.


Note: Please only use python standard libraries covered in class lectures (i.e. json, csv, urllib etc). Other libraries such as pandas, numpy are *not* allowed in your work.
Answered Same DayApr 09, 2021

Answer To: Note: Please only use python standard libraries covered in class lectures (i.e. json, csv, urllib...

Harsimran answered on Apr 10 2021
154 Votes
import os
import re
import subprocess
proc=subprocess.Popen('ls -l', shell=True, stdout=subproces
s.PIPE,).communicate()[0]
list_str = proc.decode("utf-8")
print("All files -", list_str)
for x in list_str.split('\n'):
l=re.split(r'\s',x)
print("Total size of files -",l[1])
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here