Another "live code" option for Leo.  I've added a vs-eval-block
command, in the valuespace.py plugin.

vs-eval-block
-------------

In the body, "# >>>" marks the end of a code block, and "# <<<" marks
the end of an output block.  E.g.::

    a = 2
    # >>>
    4
    # <<<
    b = 2.0*a
    # >>>
    4.0
    # <<<

``vs-eval-block`` evaluates the current code block, either the code block
the cursor's in, or the code block preceding the output block the cursor's
in.  Subsequent output blocks are marked "# >>> *" to show they may need
re-evaluation.

Note: you don't really need to type the "# >>>" and "# <<<" markers
because ``vs-eval-block`` will add them as needed.  So just type the
first code block and run ``vs-eval-block``.


and here's another example of it's use


import time
a = 7*66
# >>>
462
# <<<
print(2.3*a)
22*a
# >>>
1062.6
10164
# <<<
time.asctime()
# >>>
Tue May 16 22:34:23 2017
# <<<

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to