On Tue, Sep 14, 2010 at 6:01 PM, Benjamin Root <ben.r...@ou.edu> wrote: > True... but, consider this. ipython can already display the code for a > particular module/function using the '??' idiom. Why not have some way to > take that text and bring it into the input buffer?
Yes, but that's a separate issue. The approach you propose would likely have in ex.demo_somehting() a stub to retrieve the actual example code as a string from a file elsewhere, because (at least right now) the mpl examples are written as 100% standalone files, not as functions inside of some other control module. What you are saying does apply to the mayavi.mlab.test_*() functions, that do serve as examples precisely in that manner, since those *do* contain their code inside the functions. So for the matplotlib examples, that live in standalone files, we'd still need something different. > I can imagine this being useful beyond matplotlib where anybody could have > their example codes easily accessed and edited. Certainly! Right now the pager is a very simple tool, but I hope that once we put this code out we'll get contributions from enterprising Qt coders who may improve it and add things like a button that would copy the code from the source part of an info pane and paste it in the interactive area, all with a single click. We want to settle the core protocol/messaging behavior first, and once this is ready and people test it a little, I really hope we'll get contributions that enhance the user experience very much in this manner. Cheers, f ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel