konstantinG commited on
Commit
96e40e3
1 Parent(s): d09316c

Upload unzip.py

Browse files
Files changed (1) hide show
  1. unzip.py +10 -0
unzip.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import zipfile
3
+
4
+ def unzip(zip_file):
5
+ if not os.path.exists('img'):
6
+ os.makedirs('img')
7
+ with zipfile.ZipFile(zip_file, 'r') as zip:
8
+ zip.extractall('img')
9
+
10
+