changed switch from "sequential" to "column"
This commit is contained in:
parent
1bd6bcfe3d
commit
9fb838fd28
|
@ -18,9 +18,9 @@ parser.add_option('-a','--head', dest='head', action='store_true', help='out
|
||||||
parser.add_option('-i','--info', dest='info', action='store_true', help='output info lines')
|
parser.add_option('-i','--info', dest='info', action='store_true', help='output info lines')
|
||||||
parser.add_option('-l','--labels', dest='labels', action='store_true', help='output labels')
|
parser.add_option('-l','--labels', dest='labels', action='store_true', help='output labels')
|
||||||
parser.add_option('-d','--data', dest='data', action='store_true', help='output data')
|
parser.add_option('-d','--data', dest='data', action='store_true', help='output data')
|
||||||
parser.add_option('-s','--sequential', dest='seq', action='store_true', help='switch to label column format')
|
parser.add_option('-c','--column', dest='col', action='store_true', help='switch to label column format')
|
||||||
|
|
||||||
parser.set_defaults(seq = False)
|
parser.set_defaults(col = False)
|
||||||
(options,filenames) = parser.parse_args()
|
(options,filenames) = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ for file in files:
|
||||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||||
table.head_read() # read ASCII header info
|
table.head_read() # read ASCII header info
|
||||||
if options.head or options.info: file['output'].write('\n'.join(table.info)+'\n')
|
if options.head or options.info: file['output'].write('\n'.join(table.info)+'\n')
|
||||||
if options.head or options.labels: file['output'].write({True:'\n',False:'\t'}[options.seq].join(table.labels)+'\n')
|
if options.head or options.labels: file['output'].write({True:'\n',False:'\t'}[options.col].join(table.labels)+'\n')
|
||||||
if options.data:
|
if options.data:
|
||||||
while table.data_read(): table.data_write()
|
while table.data_read(): table.data_write()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue