Warren Turkal <w...@penguintechs.org> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to