It's possible now to have in main.py:
parser = parse_args()
import argparse, openvino
core = openvino.Core()
class print_help(argparse.Action):
def __call__(self, parser, namespace, values, option_string):
parser.print_help()
print("\nAvailable target devices: ", (" ".join(core.available_devices)))
sys.exit()
parser.add_argument('-h', '--help', action=print_help, nargs='?', default=argparse.SUPPRESS, help='Show this help message and exit.')
args = parser.parse_args()
The details are in https://github.com/openvinotoolkit/openvino/pull/20098