Hi all,
Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an
interactive python session to your log pane. Here's the docstring:
Leo.plugins.python_terminal
Provides an interactive python terminal in the log pane.
By Jacob M. Peck
Usage
Enabling this plugin will add a new tab to the Log pane, labeled “Python
Console”. This is a fully interactive python command shell, with access
tog,c, andpincluded!
Features:
* Includes support for g, c, and p
* Each outline tab has a separate python console, with a separate
namespace (aside from g, of course)
* Extremely primitive tab-completion
* Command history (use !hist to list, and !hist(n) to recall the
n’th entry)
* !clear to clear the console
Caveats:
* The console swallows stdout and stderr while focused, but
properly resets it to the default values when unfocused
* Just as with scripts, if you do something dangerous, you’re on
your own
This code is largely lifted
fromhttp://stackoverflow.com/questions/12431555/enabling-code-completion-in-an-embedded-python-interpreter,
with some modifications made for Leo embedding.
----
I hope it comes in handy for those who wish to work with Leo in a 'live'
capacity (as an alternative to livecode.py), or those who simply like to
see a REPL while they're thinking about things :) Or those who want a
simple calculator... or something.
Anyways, enjoy :)
-->Jake
--
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.