homepage

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月30日.13:32:09
SpamBayes Score 4.6777262e-05
Marked as misclassified No
Message-id <1280496732.2.0.98292485516.issue9399@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a patch that adds a 'write' action to argparse. Usage example:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument("--license", action="write", message="This file\nis licensed under \t GPL")
>>> parser.parse_args(['--license'])
This file
is licensed under GPL
A linebreak will be added after the message. The Output can be redirected with the optional 'file=' argument (it defaults to sys.stdout) The parser will then exit. 
This is my first patch ever written, so don't be too harsh if it's utter garbage^^
History
Date User Action Args
2010年07月30日 13:32:12travistouchdownsetrecipients: + travistouchdown, georg.brandl, bethard
2010年07月30日 13:32:12travistouchdownsetmessageid: <1280496732.2.0.98292485516.issue9399@psf.upfronthosting.co.za>
2010年07月30日 13:32:10travistouchdownlinkissue9399 messages
2010年07月30日 13:32:10travistouchdowncreate

AltStyle によって変換されたページ (->オリジナル) /