Okay, got it: @language python
import numpy as np def output(body, headline = 'output'): c.insertChild() c.p.h = headline c.redraw() c.p.b = body child = c.p.moveToLastChildOf(c.p.parent()) c.setCurrentPosition(child) c.redraw() a = np.array([1,3]) output(repr(a)) On Monday, July 20, 2015 at 8:44:53 AM UTC-4, john lunzer wrote: > > The rub is that c.setCurrentPosition doesn't do what I want. After I move > c.p I think c.p as I had save it becomes invalid? I'm trying to create this > node and then set it as the last child and then move the highlight/focus to > that last node. Perhaps I'm going about it in a roundabout way? > > On Monday, July 20, 2015 at 8:25:56 AM UTC-4, Edward K. Ream wrote: >> >> On Mon, Jul 20, 2015 at 7:11 AM, john lunzer <[email protected]> wrote: >> >> > >> Here is my code, which I execute with Ctrl-B: >> [snip] >> > Thoughts? >> >> c.setCurrentVnode is an synonym for c.setCurrentPosition. It's there >> for compatibility with (presumably ancient) scripts. I'm not sure how it >> could be removed without potentially breaking existing code. >> >> In any event, the solution is to forget that c.setCurrentVnode exists and >> call c.setCurrentPosition instead, with a position argument, not a vnode. >> >> Edward >> >> -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
