Message112076
| 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:12 | travistouchdown | set | recipients:
+ travistouchdown, georg.brandl, bethard |
| 2010年07月30日 13:32:12 | travistouchdown | set | messageid: <1280496732.2.0.98292485516.issue9399@psf.upfronthosting.co.za> |
| 2010年07月30日 13:32:10 | travistouchdown | link | issue9399 messages |
| 2010年07月30日 13:32:10 | travistouchdown | create |
|