Not parsing the parameters in the beginning but parse the input string read from a pipe at some time the program has already run for some time. Can boost::program_options do this? Thanks.
EDIT:
I have to test a c++ program a lot of times with different parameters in python. I want to pass parameters through subprocess.PIPE to change the program’s behavior.
Not parsing the parameters in the beginning but parse the input string read from
Share
I can’t imagine why not. That said, why are you trying to pipe the options to the program? Presumably you’re looking at an option set that’s too lengthy to type at every invocation of the program. If so, program_options has a really nice way to incorporate configuration files so that they’ll be examined for options before the command line.
As always, there’s some great documentation and examples available from Boost that explains this in detail.
EDIT: Thanks for the clarification. If you’re looking to deal with piping input to or from subprocesses in Python, then subprocess.PIPE is your friend.