classification
Title: docs: tutorial/introduction doesn't mention toggle of prompts
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: RJ722, davidmrdavid, dhoekstra, docs@python, jfine2358, miss-islington, petr.viktorin, rhettinger, thmsdnnr
Priority: normal Keywords: easy, patch

Created on 2018-08-21 18:50 by jfine2358, last changed 2021-11-23 15:44 by petr.viktorin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27105 merged thmsdnnr, 2021-07-12 23:38
PR 29119 merged miss-islington, 2021-10-21 10:19
PR 29120 merged miss-islington, 2021-10-21 10:20
Messages (9)
msg323839 - (view) Author: Jonathan Fine (jfine2358) * Date: 2018-08-21 18:50
Interactive code examples need the prompt to be stripped, before copy-and-paste. This is explained in https://docs.python.org/3/tutorial/introduction.html

But this page does not tell us about the [>>>] prompt-toggle at top of each interactive code example. This caused a user error, reported in  https://mail.python.org/pipermail/python-ideas/2018-August/052869.html.

The [>>>] toggle isn't in the Python 2.7 docs, so nothing to fix there!
msg381920 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-11-26 23:31
The toggle option is only in the HTML version with javascript enabled.  It would apply to PDF renderings or CHM files etc.
msg381928 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-11-27 02:25
- It would apply to PDF renderings or CHM files etc.
+ We wouldn't the the proposed text to be visible in PDF renderings or CHM files etc.
msg384472 - (view) Author: David Justo (davidmrdavid) Date: 2021-01-06 05:20
Hi folks! I'm interested in contributing to this issue, but I'm unsure about the context.

Can `>>>>` prompts be toggled on-and-off in the docs? I do not see that option. I read that this is possible in javascript-enabled versions of the site, but isn't that the default? If so, I have JS enabled and I do not see how to toggle them out :) . Maybe that's part of what we need to fix as well.

Thanks for your time!
msg393105 - (view) Author: Douwe Hoekstra (dhoekstra) * Date: 2021-05-06 16:11
Hi David! There is a button marked '>>>' in the top right corner of code blocks with Interactive code examples. This toggles between the interaction as it would appear in a terminal and a mode where only the input is listed without the '>>>'.

See for example the second block on https://docs.python.org/3/tutorial/introduction.html
msg402262 - (view) Author: Thomas (thmsdnnr) * Date: 2021-09-20 17:25
I added a pull request to attempt to fix this issue. It received a label but no review and has gone stale, so I am sending out a ping.
msg404581 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-10-21 10:19
New changeset 5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c by Thomas in branch 'main':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105)
https://github.com/python/cpython/commit/5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c
msg404593 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-10-21 12:41
New changeset 00ddc1fbd7296ffe066077194a895b175cca26de by Miss Islington (bot) in branch '3.10':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29119)
https://github.com/python/cpython/commit/00ddc1fbd7296ffe066077194a895b175cca26de
msg404594 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-10-21 12:42
New changeset bfa4237ecfa605ff94e86fa7141f4a8b1f7cc44a by Miss Islington (bot) in branch '3.9':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29120)
https://github.com/python/cpython/commit/bfa4237ecfa605ff94e86fa7141f4a8b1f7cc44a
History
Date User Action Args
2021-11-23 15:44:04petr.viktorinsetstatus: closed
resolution: fixed
2021-10-21 12:42:14petr.viktorinsetmessages: + msg404594
2021-10-21 12:41:49petr.viktorinsetmessages: + msg404593
2021-10-21 10:20:18miss-islingtonsetpull_requests: + pull_request27396
2021-10-21 10:19:38miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request27395
2021-10-21 10:19:28petr.viktorinsetnosy: + petr.viktorin
messages: + msg404581
2021-09-20 19:39:31rhettingersetstatus: closed -> (no value)
resolution: fixed -> (no value)
2021-09-20 19:39:06rhettingersetmessages: - msg402274
2021-09-20 19:38:45rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg402274

stage: patch review -> resolved
2021-09-20 17:25:24thmsdnnrsetmessages: + msg402262
2021-07-12 23:38:14thmsdnnrsetkeywords: + patch
nosy: + thmsdnnr

pull_requests: + pull_request25650
stage: patch review
2021-05-06 16:11:19dhoekstrasetnosy: + dhoekstra
messages: + msg393105
2021-01-06 05:20:36davidmrdavidsetnosy: + davidmrdavid
messages: + msg384472
2021-01-02 00:11:01RJ722setnosy: + RJ722
2020-11-27 02:25:37rhettingersetmessages: + msg381928
2020-11-26 23:31:42rhettingersetnosy: + rhettinger
messages: + msg381920
2020-11-26 22:45:18iritkatrielsettype: enhancement
2020-11-26 22:45:07iritkatrielsetkeywords: + easy
versions: + Python 3.9, Python 3.10, - Python 3.4, Python 3.5, Python 3.6, Python 3.7
2018-08-21 18:50:18jfine2358create