diff options
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() |