diff options
author | emkael <emkael@tlen.pl> | 2024-01-24 01:39:38 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2024-01-24 01:39:38 +0100 |
commit | f48e3cbd6c74c1cb30a71b0e57f528577ff5e814 (patch) | |
tree | 38b83ce4556134f482c78f834ac81657435bc797 /pysquaredeal.py | |
parent | 03b12e38ffa1b135b08573b9d26bfa61c7b9715e (diff) |
Moving bigdealx path management to SquareDeal interface
Diffstat (limited to 'pysquaredeal.py')
-rw-r--r-- | pysquaredeal.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pysquaredeal.py b/pysquaredeal.py index b126b74..6411d10 100644 --- a/pysquaredeal.py +++ b/pysquaredeal.py @@ -8,7 +8,7 @@ argparser = argparse.ArgumentParser(prog='pysquaredeal.py') argparser.add_argument('sqd_file', metavar='SQD_FILE', help='path to SQD file') argparser.add_argument('--sqk-file', metavar='SQK_FILE', help='path to SQK file, if not provided, deduced from SQD file', required=False) argparser.add_argument('--encoding', required=False, default='utf-8', metavar='ENCODING', help='SQD/SQK input file encoding, defaults to UTF-8, output is always UTF-8') -argparser.add_argument('--bigdealx-path', required=False, metavar='BIGDEALX_PATH', help='path to bigdealx executable, defaults to BIGDEALX_PATH environment variable') +argparser.add_argument('--bigdealx-path', required=False, default=os.environ.get('BIGDEALX_PATH'), metavar='BIGDEALX_PATH', help='path to bigdealx executable, defaults to BIGDEALX_PATH environment variable') subparsers = argparser.add_subparsers(title='command-specific arguments', metavar='COMMAND', dest='command') @@ -40,5 +40,8 @@ argparser_generate.add_argument('--reserve', action='store_true', help='generate arguments = argparser.parse_args() + +SquareDeal.BIGDEALX_PATH = arguments.bigdealx_path + sq = SquareDeal() getattr(sq, arguments.command)(**vars(arguments)) |