Hi, I want to display help message of python script and then display help message from the binary file (which also supports -h option):
Assumptions: 1) 'mybinary' - is linux executable file which supports '-h' and on '- h' option it displays the help message 2) myscript.py - when passing '-h' option want to call 'mybinary -h' and display help messages of both script and binary. Code: ==== from optparse import OptionParser [...] parser = OptionParser() parser.add_option("-e", "--execute", dest="file", help="Execute binary", metavar="FILE") (options, args) = parser.parse_args() if options.file: subprocess.call(options.file) Requirement: $ python myscript.py -h <currently it prints the help message with '-e' and '-h' help message> <becides I want to display help message of 'mybinary'> Thank you in advance. -Hiral -- http://mail.python.org/mailman/listinfo/python-list