Got it! The value of valuespace (!) is that that you can make a pythonesque session persist. I did not realize that there was no direct two-way bridge to the python window that leo launches. Even if there were, we would want to make the session persist by logging it into the outline, as valuespace (vs-create-tree) does.
Thanks for getting me up and running. Best, Bill Le dimanche 28 avril 2013 16:03:52 UTC-7, Terry a écrit : > > On Sun, 28 Apr 2013 15:24:40 -0700 (PDT) > wgw <[email protected] <javascript:>> wrote: > > > Thanks for the tip -- it will take me a while to get my head around > vspace > > (will keep an eye on Ville's blog post). > > Just to clarify, vs-eval, vs-last, vs-last-pretty are quite straight > forward, as I described them below, and do not require comprehension of > the esoterica of value-space :-) I just put them in that plugin (a) to > avoid creating yet another plugin, and (b) because it seemed sensible > to have them use the value-space namespace c.vs, but all that means for > vs-eval, vs-last, vs-last-pretty is that > > a = 7 > > executed by vs-eval assigns a value to a which can be used by > subsequent vs-eval calls (persistent for the lifetime of the session). > > For example, make a body with this text > > a = 7 > b = 3 > a + b > > and place the cursor in front of the first 'a' > > execute (Alt-x or key binding) vs-eval 4 times > > - first time executes the empty selection and selects the next line > - second time assigns 7 to a and report 7 in the log > - third time assigns 3 to b and report 3 in the log > - forth time calculates a + b and report 10 in the log > > executing vs-last(-pretty) would insert the last result (None, 7, 3, > 10) in the body. > > Cheers -Terry > > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
