Re: configargparse - reading option from config only

2021-08-30 Thread Loris Bennett
Richard Damon writes: > On 8/27/21 3:37 AM, Loris Bennett wrote: >> Richard Damon writes: >> >>> On 8/26/21 6:01 AM, Loris Bennett wrote: Hi, When using configargparse, it seems that if a value is to be read from a config file, it also has to be defined as a command-line argu

Re: configargparse - reading option from config only

2021-08-27 Thread Richard Damon
On 8/27/21 3:37 AM, Loris Bennett wrote: > Richard Damon writes: > >> On 8/26/21 6:01 AM, Loris Bennett wrote: >>> Hi, >>> >>> When using configargparse, it seems that if a value is to be read from a >>> config file, it also has to be defined as a command-line argument in >>> order to turn up as a

Re: configargparse - reading option from config only

2021-08-27 Thread Loris Bennett
tuxifreund writes: > Hello, > > you could use the argparse module[1] to parse command line arguments and > configparser[2] to parse configuration files following the ini file > structure. Is that what you are expecting? I have used the combination of argparse and configparser before. However,

Re: configargparse - reading option from config only

2021-08-27 Thread Loris Bennett
Richard Damon writes: > On 8/26/21 6:01 AM, Loris Bennett wrote: >> Hi, >> >> When using configargparse, it seems that if a value is to be read from a >> config file, it also has to be defined as a command-line argument in >> order to turn up as an attribute in the parser namespace. >> >> I can

Re: configargparse - reading option from config only

2021-08-26 Thread Richard Damon
On 8/26/21 6:01 AM, Loris Bennett wrote: > Hi, > > When using configargparse, it seems that if a value is to be read from a > config file, it also has to be defined as a command-line argument in > order to turn up as an attribute in the parser namespace. > > I can sort of see why this is the case

Re: configargparse - reading option from config only

2021-08-26 Thread tuxifreund
Hello, you could use the argparse module[1] to parse command line arguments and configparser[2] to parse configuration files following the ini file structure. Is that what you are expecting? Cheers [1]: https://docs.python.org/3/library/argparse.html [2]: https://docs.python.org/3/library/con

configargparse - reading option from config only

2021-08-26 Thread Loris Bennett
Hi, When using configargparse, it seems that if a value is to be read from a config file, it also has to be defined as a command-line argument in order to turn up as an attribute in the parser namespace. I can sort of see why this is the case, but there are also some options I would like to rea