Visitar URL original
Implement copybutton for the shell session · Issue #35 · python/python-docs-theme · GitHub
Skip to content

Implement copybutton for the shell session #35

Description

@serhiy-storchaka

Currently the Python session code blocks has a button on top-right corner which hides the >>> and ... prompts and the output.

Would be nice to implement similar button for the shell session code blocks. It should hide the $ prompt and the output.

Activity

  1. terryjreedy commented on Dec 13, 2019

    @terryjreedy
    Member

    This tutorrial example has one of each. But the command session has only one $ prompt and command. Are there other examples with more?

  2. freddrake commented on Dec 13, 2019

    @freddrake
    Member

    That example only shows the Python prompt as output; there's no issue of there being additional input there. (I haven't looked for other examples.)

    That example also mistakenly colorizes the first > of the Python prompt as a shell continuation prompt.

  3. pradyunsg commented on May 1, 2021

    @pradyunsg
    Member

    This exists in the form of a Sphinx extension now: https://github.com/executablebooks/sphinx-copybutton

  4. hugovk commented on Feb 6, 2026

    @hugovk
    Member

    Please see PR #295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions