ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/ZipSize.py
Revision: 232
Committed: Wed Dec 19 20:55:55 2012 UTC (13 years, 3 months ago) by nino.borges
Content type: text/x-python
File size: 581 byte(s)
Log Message:
changed expire date on chai v8 and 10. Added GatherSize to MCP lib.

File Contents

# User Rev Content
1 nino.borges 232 """
2    
3     ZipSize.py
4    
5     Created by
6     Emanuel Borges
7     11.28.2012
8    
9     This program will return the uncompressed size of a zip file. This will actually run on LN and be called
10     through expedat."""
11    
12     import zipfile, sys
13    
14     def GetZipSize(zipFile):
15     tempZipSize = 0
16     tempZip = zipfile.ZipFile(zipFile,'r')
17     for zipInfo in tempZip.infolist():
18     tempZipSize = tempZipSize + zipInfo.file_size
19     tempZip.close()
20     return tempZipSize
21     #totalSize.inc(tempZipSize)
22    
23     if __name__=="__main__":
24     zipFile = sys.argv[1]
25     size = GetZipSize(zipFile)
26     print size