Issue 13826: Having a shlex example in the subprocess.Popen docs is confusing (original) (raw)
Created on 2012-01-19 14:25 by Julian, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 18438 | merged | tdsmith,2020-02-10 20:50 | |
PR 18445 | merged | miss-islington,2020-02-10 22:51 | |
PR 18446 | merged | miss-islington,2020-02-10 22:51 |
Messages (7) | ||
---|---|---|
msg151624 - (view) | Author: Julian Berman (Julian) * | Date: 2012-01-19 14:25 |
The example at http://docs.python.org/dev/library/subprocess.html#popen-constructor seems a bit misplaced, as it seems to suggest that one should use the shlex module. Most of the other examples in the module seem to use a list to provide the args, so if there was a need to just point out that shlex could be used for a corner case perhaps it'd be better suited as a footnote or another subsection somewhere. | ||
msg151627 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2012-01-19 14:36 |
It is not particularly intuitive what goes in to a Popen non-shell argument list, unless you are an experienced programmer. The real purpose of the note is to convey a lot of information about how tokenization works in a short example, and it also demonstrates how to investigate other complex cases the user may have to deal with. Because of the first part of that (showing tokenization quirks) I don't think it should be relegated to a footnote. That said, the example could perhaps be reworded slightly to make its expositional purpose clearer. Suggestions welcome. | ||
msg151631 - (view) | Author: Sandro Tosi (sandro.tosi) * ![]() |
Date: 2012-01-19 14:45 |
Maybe we can add a very small example before the whole note to show just how to use Popen in simple situation, and so the shlex part below will add more details for more advanced cases. | ||
msg151649 - (view) | Author: Julian Berman (Julian) * | Date: 2012-01-19 19:41 |
Sounds reasonable to me. I'll take a look at adding one unless someone manages to beat me to it. | ||
msg361741 - (view) | Author: miss-islington (miss-islington) | Date: 2020-02-10 22:51 |
New changeset 95d024d585bd3ed627437a2f0cbc783c8a014c8a by Tim D. Smith in branch 'master': bpo-13826: Clarify Popen constructor example (GH-18438) https://github.com/python/cpython/commit/95d024d585bd3ed627437a2f0cbc783c8a014c8a | ||
msg361743 - (view) | Author: miss-islington (miss-islington) | Date: 2020-02-10 22:56 |
New changeset 78982f94faaa05e363d15b49ec230d11a4d8bebd by Miss Islington (bot) in branch '3.7': bpo-13826: Clarify Popen constructor example (GH-18438) https://github.com/python/cpython/commit/78982f94faaa05e363d15b49ec230d11a4d8bebd | ||
msg361744 - (view) | Author: miss-islington (miss-islington) | Date: 2020-02-10 22:57 |
New changeset e6690f6cd1b0c2bd5804bad30239a4070f79102c by Miss Islington (bot) in branch '3.8': bpo-13826: Clarify Popen constructor example (GH-18438) https://github.com/python/cpython/commit/e6690f6cd1b0c2bd5804bad30239a4070f79102c |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:25 | admin | set | github: 58034 |
2020-02-10 23:54:57 | gvanrossum | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2020-02-10 22:57:09 | miss-islington | set | messages: + |
2020-02-10 22:56:18 | miss-islington | set | messages: + |
2020-02-10 22:51:25 | miss-islington | set | pull_requests: + <pull%5Frequest17820> |
2020-02-10 22:51:16 | miss-islington | set | pull_requests: + <pull%5Frequest17819> |
2020-02-10 22:51:05 | miss-islington | set | nosy: + miss-islingtonmessages: + |
2020-02-10 20:50:10 | tdsmith | set | keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest17812> |
2016-04-19 00:07:35 | berker.peksag | set | keywords: + easystage: needs patchversions: + Python 3.5, Python 3.6, - Python 2.7, Python 3.2, Python 3.3 |
2014-05-16 05:54:47 | cvrebert | set | nosy: + cvrebert |
2012-02-03 14:35:00 | eric.araujo | set | nosy: + eric.araujo |
2012-01-19 19:41:57 | Julian | set | messages: + |
2012-01-19 14:45:46 | sandro.tosi | set | nosy: + sandro.tosimessages: + versions: - Python 2.6, Python 3.1 |
2012-01-19 14:37:14 | r.david.murray | set | priority: normal -> low |
2012-01-19 14:36:48 | r.david.murray | set | nosy: + r.david.murraymessages: + |
2012-01-19 14:25:14 | Julian | create |