SHARE
TWEET

Untitled

a guest Jul 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import csv
  2. import zipfile
  3.  
  4. with open("C:/Users/Peter Cui/Desktop/STACAN/ALLTABLES.csv", 'r') as CSV_LIST:
  5.     READER = csv.reader(CSV_LIST)
  6.     READ_LIST = list(READER)
  7.  
  8. COUNTER = 0
  9. while COUNTER < 1:
  10.     LIST_ROWNUM = READ_LIST[COUNTER]
  11.     ENTRY_NUM = LIST_ROWNUM[0]
  12.     print(ENTRY_NUM)
  13.     with zipfile.ZipFile("C:/Users/Peter Cui/Desktop/STACAN/" + ENTRY_NUM + "-eng.zip", 'r') as ZIP_EXTRACT:
  14.     ZIP_EXTRACT.extractall("C:/Users/Peter Cui/Desktop/STACAN/EXTRACTED")
  15.     ZIP_EXTRACT.close()
  16.     COUNTER = COUNTER + 1
  17.      
  18. for abcd in mylist:
  19.     print(abcd)
  20.      
  21. with zipfile.ZipFile("C:/Users/Peter Cui/Desktop/STACAN/" + ENTRY_NUM + "-eng.zip", 'r') as ZIP_EXTRACT:
  22.     ZIP_EXTRACT.extractall("C:/Users/Peter Cui/Desktop/STACAN/EXTRACTED")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top