From 7137448f657c2bc1b461e17438b4928d0b1f766a Mon Sep 17 00:00:00 2001 From: piair338 Date: Sun, 16 Oct 2022 13:15:00 +0000 Subject: [PATCH] allow multiple config --- V4.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/V4.py b/V4.py index fcbc52f..6d83564 100755 --- a/V4.py +++ b/V4.py @@ -48,7 +48,7 @@ parser.add_argument( ) parser.add_argument( - "-c", "--config", help="Choose a specific config file", dest="fast", action="store_true" + "-c", "--config", help="Choose a specific config file", type=argparse.FileType('r') ) args = parser.parse_args() @@ -79,7 +79,15 @@ else: system("") # enable colors in windows cmd #reading configuration + config_path = f"{path.abspath( path.dirname( __file__ ) )}/user_data/config.cfg" +if args.file : + config_path = os.path.abspath(args.file.name) + + + + + config = configparser.ConfigParser() config.read(config_path)