Commit 9bd7c4eb authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: corrections to format/sep handling

parent 1e33895e
......@@ -39,7 +39,10 @@ def exportCSV(dtable, outfile, **kwargs):
default value for the `sep`` argument is a ``','`` instead of a ``'\t'``.
"""
sep = kwargs.pop('sep', ',')
sep = kwargs.pop('sep', None)
if sep is None:
sep = ','
exportTSV(dtable, outfile, sep=sep, **kwargs)
......
......@@ -72,7 +72,9 @@ def main(argv=None):
# from output filename or, failing
# that, tsv
if args.format is None:
fmt = op.splitext(args.outfile)[1].lower()
fmt = op.splitext(args.outfile)[1].lower().strip('.')
if fmt in ('h5', 'hdf'):
fmt = 'hdf5'
if not custom.exists('exporter', fmt):
fmt = 'tsv'
args.format = fmt
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment