You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
287 B
10 lines
287 B
6 years ago
|
import os
|
||
|
import zipfile
|
||
|
|
||
|
|
||
|
def zip(inputFile, outFile):
|
||
|
f = zipfile.ZipFile(outFile, 'w', zipfile.ZIP_DEFLATED)
|
||
|
for dirpath, dirnames, filenames in os.walk(inputFile):
|
||
|
for filename in filenames:
|
||
|
f.write(os.path.join(dirpath, filename), filename)
|
||
|
f.close()
|