updated to new ASCII table style

This commit is contained in:
Martin Diehl 2015-08-18 07:56:03 +00:00
parent d0b75b5a10
commit ca1fe6bb82
1 changed files with 10 additions and 9 deletions

View File

@ -85,17 +85,18 @@ if options.weight != None: labels += [options.weight]
# --- loop over input files ------------------------------------------------------------------------- # --- loop over input files -------------------------------------------------------------------------
if filenames == []: filenames = ['STDIN'] if filenames == []: filenames = [None]
for name in filenames: for name in filenames:
if not (name == 'STDIN' or os.path.exists(name)): continue try:
table = damask.ASCIItable(name = name, table = damask.ASCIItable(name = name,
outname = os.path.join(os.path.dirname(name), outname = os.path.join(os.path.dirname(name),
'binned-%s-%s_'%(options.data[0],options.data[1])+ \ 'binned-%s-%s_'%(options.data[0],options.data[1])+ \
('weighted-%s_'%(options.weight) if options.weight != None else '') + \ ('weighted-%s_'%(options.weight) if options.weight != None else '') + \
os.path.basename(name)) os.path.basename(name)), buffered = False)
buffered = False) except:
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name != 'STDIN' else '')) continue
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else ''))
# ------------------------------------------ read header ------------------------------------------ # ------------------------------------------ read header ------------------------------------------