adopted recent changes to API in ASCIItable.
This commit is contained in:
parent
93dd9f5c09
commit
cd70ec5a38
|
@ -40,13 +40,14 @@ parser.set_defaults(grid = ['0','0','0'],
|
||||||
|
|
||||||
# --- 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, outname = name+'_tmp',
|
table = damask.ASCIItable(name = name,
|
||||||
buffered = False, labeled = False)
|
buffered = False, labeled = False)
|
||||||
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name != 'STDIN' else ''))
|
except: continue
|
||||||
|
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else ''))
|
||||||
|
|
||||||
# --- interpret header ----------------------------------------------------------------------------
|
# --- interpret header ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -149,4 +150,3 @@ for name in filenames:
|
||||||
# --- output finalization --------------------------------------------------------------------------
|
# --- output finalization --------------------------------------------------------------------------
|
||||||
|
|
||||||
table.close() # close ASCII table
|
table.close() # close ASCII table
|
||||||
if name != 'STDIN': os.rename(name+'_tmp',name) # overwrite old one with tmp new
|
|
||||||
|
|
Loading…
Reference in New Issue