Commit 2b93891f authored by Nic's avatar Nic
Browse files

improve XLSX engine selection from CLI

parent fb36262a
......@@ -16,6 +16,7 @@ import sys
import pandas as pd
from gridsource import Data, IOData, ValidData, __version__
from gridsource.io import DEFAULT_EXCEL_ENGINE
def version(args=None):
......@@ -92,7 +93,7 @@ def parse_args(args):
"""Console script"""
# https://docs.python.org/3/library/argparse.html
# https://docs.python.org/3/howto/argparse.html
parser = argparse.ArgumentParser("easy CLI for app_name")
parser = argparse.ArgumentParser("gsource")
parser.add_argument(
"-v", "--verbose", action="store_true", help="Show Version and exit"
)
......@@ -110,9 +111,9 @@ def parse_args(args):
"-e",
"--engine",
type=str,
default="xlrd",
default=DEFAULT_EXCEL_ENGINE,
choices=("xlrd", "openpyxl"),
help="pandas XLSX reader engine",
help="XLSX reader engine (default '%s')" % DEFAULT_EXCEL_ENGINE,
)
parser_export.set_defaults(process=export)
# =========================================================================
......
Markdown is supported
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