Message153463
| Author |
wt |
| Recipients |
bethard, eric.smith, kalt, wt |
| Date |
2012年02月16日.07:27:44 |
| SpamBayes Score |
1.4386332e-07 |
| Marked as misclassified |
No |
| Message-id |
<1329377265.35.0.706242205223.issue13922@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Using argparse.REMAINDER will not help for my problem in my real program as the first arg needs to be handled by my program and mapped into the real binary name.
If I recall correctly from memory, the following is what happened when I tried using argparse.REMAINDER. If call my program like so:
$ hack run :target --help
The subcommand will be "run" in this case. Because :target is handled by argparse, the "--help" will not be seen as part of the remainder of the arguments, and I will get the help for the "hack run" subcommand instead of the target binary getting the --help argument. I have pushed most of the program to [1] if you want to take a look. Specifically, see cli/commands/run.py:do_run for that bit of code that handles the run subcommand.
[1]https://github.com/wt/repo-digg-dev-hackbuilder |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月16日 07:27:45 | wt | set | recipients:
+ wt, bethard, eric.smith, kalt |
| 2012年02月16日 07:27:45 | wt | set | messageid: <1329377265.35.0.706242205223.issue13922@psf.upfronthosting.co.za> |
| 2012年02月16日 07:27:44 | wt | link | issue13922 messages |
| 2012年02月16日 07:27:44 | wt | create |
|