Dennis Malcorps <dennis.malco...@googlemail.com> added the comment: > parser.add_argument('--license', action='write', message='...', > file=sys.stdout) The ability to redirect the output would be a nice addition.
> parser.add_argument('--license', action='call', callable=lambda: > sys.stdout.write(message)) optparse already has a 'callable' action, I had the impression it was left out of argparse on purpose, even tough I couldn't imagine why... Either way is fine for me. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9399> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com