homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Having a shlex example in the subprocess.Popen docs is confusing
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Julian, cvrebert, docs@python, eric.araujo, miss-islington, r.david.murray, sandro.tosi
Priority: low Keywords: easy, patch

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) * (Python committer) 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) * (Python committer) 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:25adminsetgithub: 58034
2020年02月10日 23:54:57gvanrossumsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020年02月10日 22:57:09miss-islingtonsetmessages: + msg361744
2020年02月10日 22:56:18miss-islingtonsetmessages: + msg361743
2020年02月10日 22:51:25miss-islingtonsetpull_requests: + pull_request17820
2020年02月10日 22:51:16miss-islingtonsetpull_requests: + pull_request17819
2020年02月10日 22:51:05miss-islingtonsetnosy: + miss-islington
messages: + msg361741
2020年02月10日 20:50:10tdsmithsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request17812
2016年04月19日 00:07:35berker.peksagsetkeywords: + easy
stage: needs patch
versions: + Python 3.5, Python 3.6, - Python 2.7, Python 3.2, Python 3.3
2014年05月16日 05:54:47cvrebertsetnosy: + cvrebert
2012年02月03日 14:35:00eric.araujosetnosy: + eric.araujo
2012年01月19日 19:41:57Juliansetmessages: + msg151649
2012年01月19日 14:45:46sandro.tosisetnosy: + sandro.tosi

messages: + msg151631
versions: - Python 2.6, Python 3.1
2012年01月19日 14:37:14r.david.murraysetpriority: normal -> low
2012年01月19日 14:36:48r.david.murraysetnosy: + r.david.murray
messages: + msg151627
2012年01月19日 14:25:14Juliancreate

AltStyle によって変換されたページ (->オリジナル) /