I&#39;m part of team developing the Bundle Activity which will handle zip (and other) archives and have run into a problem with the Zip library in Python.<br>We are currently trying to zip a list of files, and then have the program perform other operations with the resulting zip file. The problem is that Python seems to run asynchronously, so the program execution skips the zip file completion and goes on to the next instructions (which is NOT what we want). In other words, the instructions that handle the resulting zip file get run before the zip file is completely finished. Our code looks like:<br>
<br>myZip = zipfile.ZipFile(file_name, &#39;w&#39;)<br>try:<br>&nbsp;&nbsp; for a_file in file_list:<br>&nbsp;&nbsp;&nbsp;&nbsp; myZip.write(a_file)<br>finally:<br>&nbsp; myZip.close()<br><br># zip handling instructions<br>shutil.copy(file_name, journal_location)<br>
# ... put the zip file in the journal ...<br>....<br><br>What can we do to have this work?<br><br>Thanks,<br><br>Nolan<br><br><br>