[experiment]: http://michaelgalloy.com/wp-content/uploads/2012/05/prompt_hiding.html “Prompt hiding example”
[sphinx]: http://sphinx.pocoo.org/ “Sphinx documentation”
[^1]: Sphinx is somewhat the Python equivalent to IDLdoc, but much more general.
While looking up some Python docs generated by the excellent [Sphinx][sphinx] documentation tool[^1], I noticed that Sphinx can show/hide the prompts and output in a code snippet. This allows the user to see the full code and output, but then can hit a button and get text suitable for cut-and-pasting onto the command line to try it for themselves. Check out my simple [experiment] to see how it works.
I will definitely have to work this into an IDLdoc release soon.
May 16th, 2012 at 8:08 pm
Here’s an example of IDLdoc using this idea.
May 17th, 2012 at 4:49 pm
OK, styling is a bit better now; this is in the trunk of IDLdoc now and will be in the next release.
May 17th, 2012 at 9:04 pm
This is really cool, Mike; thanks!