Popular recipes by Andre Roberge http://code.activestate.com/recipes/users/2467063/2008-10-15T01:27:26-07:00ActiveState Code RecipesViewing embedded pictures within docstrings (Python) 2008-10-15T01:27:26-07:00Andre Robergehttp://code.activestate.com/recipes/users/2467063/http://code.activestate.com/recipes/576538-viewing-embedded-pictures-within-docstrings/ <p style="color: grey"> Python recipe 576538 by <a href="/recipes/users/2467063/">Andre Roberge</a> (<a href="/recipes/tags/docstring/">docstring</a>, <a href="/recipes/tags/embedded_image/">embedded_image</a>, <a href="/recipes/tags/viewer/">viewer</a>). </p> <p>Python docstrings are textual information about objects. They can be displayed via help(obj). However, they can not contain images. This recipe allows the inclusion of images (encoded in base 64 in the Python file) inside docstrings in a transparent way. The images are indicated as "docpicture = file_name.ext" inside the docstring, and the encoded data is in variable "file_name" inside the same module.</p> Instant GUI compiler for testing purpose (Python) 2006-01-30T15:46:23-08:00Andre Robergehttp://code.activestate.com/recipes/users/2467063/http://code.activestate.com/recipes/473812-instant-gui-compiler-for-testing-purpose/ <p style="color: grey"> Python recipe 473812 by <a href="/recipes/users/2467063/">Andre Roberge</a> . </p> <p>I find that I often want to test some small code samples, too long to type at the interpreter (and retype, with some small changes), but not worth saving. The following wxPython based mini-app implements the basic for a small Python editor with a side output window. It also handles input() and raw_input().</p>