Guest User

Untitled

a guest
May 23rd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. import time
  2. import py7zlib
  3.  
  4. datapath = '/home/emilio/Documents/Personal/BetfairData/HistoricalData/'
  5. fullfilename = 'horses_2007.7z'
  6.  
  7. print 'Opening archive ' + fullfilename        
  8. archive = py7zlib.Archive7z( file(datapath + fullfilename) )
  9.              
  10. for name in archive.getnames():
  11.         print '------------------------------------------------------------'
  12.         print 'Processing file ' + name
  13.        
  14.         start = time.time()                
  15.         member = archive.getmember(name)
  16.         temp = member.read()
  17.         elapsed = (time.time() - start)
  18.         print 'Unzipping file took ' + str(elapsed) + 'sec'
Add Comment
Please, Sign In to add comment