diff options
author | Graham Northup <grissess@nexusg.org> | 2018-10-10 19:31:05 -0400 |
---|---|---|
committer | Graham Northup <grissess@nexusg.org> | 2018-10-10 19:31:05 -0400 |
commit | 0cf3c6721456258219f627657c04982c7d49d159 (patch) | |
tree | 426772d05c62e515001c153f8247b9fa168174a8 /broadcast.py | |
parent | 5afaac2cda949243a98849f6bf7c217a61fbc8e3 (diff) |
added compressions for IV files
Diffstat (limited to 'broadcast.py')
-rw-r--r-- | broadcast.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/broadcast.py b/broadcast.py index bd607ca..d554e97 100644 --- a/broadcast.py +++ b/broadcast.py @@ -456,7 +456,15 @@ for fname in args: print 'PCM: exit' continue try: - iv = ET.parse(fname).getroot() + if fname.endswith('.ivz'): + import gzip + ivf = gzip.open(fname, 'rb') + elif fname.endswith('.ivb'): + import bz2 + ivf = bz2.BZ2File(fname, 'r') + else: + ivf = open(fname, 'rb') + iv = ET.parse(ivf).getroot() except IOError: import traceback traceback.print_exc() |