I have the following code:
pz = open(packagezip, 'rb')
packz = zipfile.ZipFile(pz)
for name in packz.namelist():
packz.extract(name, package_ext_loc)
pz.close()
If the files to extract from (packagezip) encounter a folder in the destination location (package_ext_loc) with the same name, will this function automaticaly overwrite the folder and files as this IS what I want, if not is there a simple additional script to force this to happen.
edit having gone through some websites I believe the zipfile.extractall overwrites if destination folder already exists. how could I use extractall in this example.