[issue9938] Documentation for argparse interactive use

2019-08-21 Thread hai shi
Change by hai shi : -- pull_requests: +15073 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15362 ___ Python tracker ___

[issue9938] Documentation for argparse interactive use

2019-07-13 Thread Milan Oberkirch
Milan Oberkirch added the comment: This issue is a duplicate of issue 9112 which was resolved by commit 9375492b -- nosy: +zvyn ___ Python tracker ___

[issue9938] Documentation for argparse interactive use

2017-05-24 Thread Sourav Singh
Sourav Singh added the comment: I would like to send a patch for the issue. How do I start -- nosy: +Sourav Singh ___ Python tracker ___

[issue9938] Documentation for argparse interactive use

2016-11-28 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___

[issue9938] Documentation for argparse interactive use

2015-02-24 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___ Python-bugs-list

[issue9938] Documentation for argparse interactive use

2013-07-01 Thread paul j3
paul j3 added the comment: The exit and error methods are mentioned in the 3.4 documentation, but there are no examples of modifying them. 16.4.5.9. Exiting methods ArgumentParser.exit(status=0, message=None) ArgumentParser.error(message) test_argparse.py has a subclass that

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread Ethan Furman
Ethan Furman added the comment: It doesn't look like xuanji has signed a CLA. Should we create a new issue, and have someone else create a new patch, and let this issue just be about the docs? -- nosy: +ethan.furman ___ Python tracker

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Yes, I think opening a new issue at this point might be a good idea. The reason is that there are a changes either in place or pending in other issues that involve the parse_know_args code, so a new patch is probably required regardless. I wish I had time

[issue9938] Documentation for argparse interactive use

2013-06-27 Thread Andrew Berg
Andrew Berg added the comment: What is the status of this? If the patch looks good, then will it be pushed into 3.4? -- nosy: +aberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___

[issue9938] Documentation for argparse interactive use

2013-06-27 Thread R. David Murray
R. David Murray added the comment: It's great that this patch was provided. Xuanji, can you submit a contributor agreement, please? The patch is missing an update to the documentation. (Really the patch should have been in a separate issue, as requested, since this one is about improving

[issue9938] Documentation for argparse interactive use

2013-06-27 Thread Andrew Berg
Andrew Berg added the comment: The patch doesn't work for 3.3 (I think it's just because the line numbers are different), but looking over what the patch does, it looks like parse_known_args will return a value for args if there is an unrecognized argument, which will cause parse_args to call

[issue9938] Documentation for argparse interactive use

2011-12-15 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___

[issue9938] Documentation for argparse interactive use

2011-05-29 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: Updated previous patch with test cases and renamed exit_on_argument_error flag to exit_on_error. -- Added file: http://bugs.python.org/file22172/issue9938_with_test.patch ___ Python tracker

[issue9938] Documentation for argparse interactive use

2011-05-16 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW unittest had a similar issue and it's been solved adding an 'exit' argument to unittest.main() [0]. I think using an attribute here might be fine. The patch contains some trailing whitespace that should be removed, also it might be

[issue9938] Documentation for argparse interactive use

2011-04-27 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: I don't think it's best to create a new subclass to throw an ArgumentParserExit exception; if I read the stack trace I'd see that an ArgumentError was thrown, then caught, then an ArgumentParserExit was thrown, which IMHO is confusing. In the

[issue9938] Documentation for argparse interactive use

2010-12-19 Thread Xuanji Li
Changes by Xuanji Li xua...@gmail.com: -- nosy: +xuanji ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___ Python-bugs-list mailing list

[issue9938] Documentation for argparse interactive use

2010-12-17 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: In the short term, just catch the SystemExit. In the slightly longer term, we could certainly provide a subclass, say, ErrorRaisingArgumentParser, that overrides .exit and .error to do nothing but raise an exception with the message

[issue9938] Documentation for argparse interactive use

2010-12-16 Thread Tan Zong Xuan
Tan Zong Xuan tzxru...@gmail.com added the comment: I am also trying to use argparse interactively, but in this case by combining it with the cmd module. So I'm doing something like below: class MyCmd(cmd.Cmd): parser = argparse.ArgumentParser(prog='addobject')

[issue9938] Documentation for argparse interactive use

2010-12-16 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: You can always catch SystemExit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___

[issue9938] Documentation for argparse interactive use

2010-11-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Do you want to work on a patch? (Aside: you may want to learn about the cmd and shlex modules for read-eval-print-loop programs :) -- keywords: +easy nosy: +eric.araujo ___ Python tracker

[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Jay T
New submission from Jay T jayt...@gmail.com: I want to create a custom interactive shell where I continually do parse_args. Like the following: parser = argparse.ArgumentParser() command = raw_input() while(True): args = parser.parse_args(shlex.split(command)) # Do some magic stuff

[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Steven Bethard
Changes by Steven Bethard steven.beth...@gmail.com: -- nosy: +bethard versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___