Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6911043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:54:00+00:00 2026-05-27T08:54:00+00:00

I want the same functionality mention in Sphinx, reStructuredText show/hide code snippets . But

  • 0

I want the same functionality mention in Sphinx, reStructuredText show/hide code snippets. But there is no code shared on that post.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:54:01+00:00Added an answer on May 27, 2026 at 8:54 am

    SQLAlchemy docs

    The SQLAlchemy documentation uses a special extension (https://bitbucket.org/zzzeek/zzzeeksphinx/).

    The documentation source contains markup with custom options and tokens, like in this example:

    .. sourcecode:: python+sql
     
        {sql}>>> engine.execute("select 1").scalar()
        select 1
        ()
        {stop}1
    

    This is processed by a special Pygments lexer (PythonWithSQLLexer) and Pygments formatter (PopupSQLFormatter) in order to generate a "popup" <div> with the code snippet and the link that shows/hides it. The source code is in sqlformatter.py.

    The show/hide toggling is handled by jQuery magic in init.js.

    The Mako templating system is used to generate the HTML pages (the default templating system in Sphinx is Jinja). This is configured by subclassing TemplateBridge in mako.py.

    In the template file layout.mako, the paths to CSS and JavaScript files (including init.js) are specified. For more on Sphinx templating, see http://sphinx-doc.org/templating.html.

    Python docs

    Many code examples in the Python documentation feature a "button" that toggles display of interactive prompts (>>>, ...) and output in doctest-style code snippets. With prompts and output out of the way, the code can be more easily copied and pasted. Here are several examples: http://docs.python.org/library/datetime.html#module-datetime.

    The feature is implemented in copybutton.js.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do the same that works previously on HTML but now via
I want to have the same functionality of select in HTML but using div
We want to use the same user-id across all our dev tools, but this
I want to do the same functionality for first name Field and Surname field
I'm making an App Engine site that I don't want to be nationwide, but
My client want to archive the same functionality product preview as this one: http://www.ikea.com/us/en/catalog/categories/departments/laundry
How can I leverage the same functionality of .select() but for elements other textboxes
I am trying to get the same functionality that a combobox has, like combobox1.Items.Add()
I currently have a couple different user controls that provide the same functionality: three
I want to implement functionality like back and forward in my project same as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.