New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate prompt characters in examples from copyable text #267
Comments
From Georg Brandl on 2009-11-08 17:24:12+00:00 I assume this would require a piece of JavaScript that removes the prompts before copying. The only question is what to do with output between prompts -- remove it as well? Many doctest-style examples are meant to be executed one after the other in a shell; larger samples should not have doctest markup. Anyway, let's keep this open as a nice-to-have. |
From Gregg Lind on 2010-04-02 20:56:44+00:00 After some discussion with Taggnoster, we wrote some code to handle this. see: 1800:bfc9819c802f |
From tpowers on 2010-04-27 04:11:08+00:00 When I need to do this sort of thing (rarely), the easiest thing to do is to fire up wxPython's pycrust or pyshell and just use the Paste or Paste Plus commands. |
From Georg Brandl on 2010-08-05 17:46:33+00:00 Issue #389 was marked as a duplicate of this issue. |
From Ram Rachum on 2011-01-14 08:22:44+00:00 Issue #604 was marked as a duplicate of this issue. |
From Ram Rachum on 2011-01-14 08:25:47+00:00 The annoying thing about having JS copy-paste trickery is that the user doesn't know that it's there. The user might avoid copy-pasting shell sessions completely after he sees that the prompts get selected together with the code, without even trying to paste so he won't see that the ">>> " parts disappear. Do you think it's possible to automatically generate tables so that the prompts are in a separate cell than the code? |
From Georg Brandl on 2011-01-15 08:51:49+00:00 Tables might work but for interleaved output, which needs to be skipped as well. |
add 'diff' parameter to literalinclude.
Has this been addressed already? |
This issue is hard to find, and hence so many duplicates.
Can someone with enough privileges amend the title? |
Could this CSS trick is releveant, relying on |
…ock from copyable text
I use |
Close #267: html: Eliminate prompt characters of doctest block from c…
Fixed by #6727 . (It's 10yrs after posted!) |
It would be nice if the prompt characters in examples were easily copyable and pasteable somehow. For example, if this showed up on the document:
And you selected it, only these bits were selected.
This would make it easier to actually paste the examples into an interpreter.
The text was updated successfully, but these errors were encountered: