From ca1fe6bb82650d92c905ffe4e7b89f236e3b28fc Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 18 Aug 2015 07:56:03 +0000 Subject: [PATCH] updated to new ASCII table style --- processing/post/binXY.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/processing/post/binXY.py b/processing/post/binXY.py index 627d8f27f..82e524aa2 100755 --- a/processing/post/binXY.py +++ b/processing/post/binXY.py @@ -85,17 +85,18 @@ if options.weight != None: labels += [options.weight] # --- loop over input files ------------------------------------------------------------------------- -if filenames == []: filenames = ['STDIN'] +if filenames == []: filenames = [None] for name in filenames: - if not (name == 'STDIN' or os.path.exists(name)): continue - table = damask.ASCIItable(name = name, - outname = os.path.join(os.path.dirname(name), - 'binned-%s-%s_'%(options.data[0],options.data[1])+ \ - ('weighted-%s_'%(options.weight) if options.weight != None else '') + \ - os.path.basename(name)) - buffered = False) - table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name != 'STDIN' else '')) + try: + table = damask.ASCIItable(name = name, + outname = os.path.join(os.path.dirname(name), + 'binned-%s-%s_'%(options.data[0],options.data[1])+ \ + ('weighted-%s_'%(options.weight) if options.weight != None else '') + \ + os.path.basename(name)), buffered = False) + except: + continue + table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else '')) # ------------------------------------------ read header ------------------------------------------