9 import cStringIO as StringIO
14 SRC = "http://www.3gpp.org/ftp/Specs/archive/06_series/06.06/0606-421.zip"
17 def get_zipfile(data):
18 return zipfile.ZipFile(StringIO.StringIO(data))
21 def get_subfile_data(data, filename):
23 return z.read(filename)
26 def process_file(z, e):
27 fh = open(e.filename.lower(), 'w')
28 d = z.read(e).replace('\r','')
37 print "Usage: %s target_dir" % args[0]
42 # Create and go to target dir
43 if not os.path.isdir(tgt):
47 # Get the original data
48 u = urllib2.urlopen(SRC)
52 d = get_subfile_data(d, 'DISK.zip')
55 d = get_subfile_data(d, 'Dir_C.zip')
65 if __name__ == '__main__':