This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author travistouchdown
Recipients bethard, georg.brandl, travistouchdown
Date 2010-07-29.15:22:21
SpamBayes Score 0.057104878
Marked as misclassified No
Message-id <1280416943.47.0.138607185468.issue9399@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2010-07-29 15:22:23travistouchdownsetrecipients: + travistouchdown, georg.brandl, bethard
2010-07-29 15:22:23travistouchdownsetmessageid: <1280416943.47.0.138607185468.issue9399@psf.upfronthosting.co.za>
2010-07-29 15:22:21travistouchdownlinkissue9399 messages
2010-07-29 15:22:21travistouchdowncreate