On Tue, Mar 2, 2010 at 11:52 AM, Terry Brown <[email protected]> wrote:
> For people who do a lot of stuff in a shell window and record / edit / manage 
> that stuff in Leo.  This might be command line computer / software management 
> (bash or whatever), or SQL or R even ipython, although Ville's tools provide 
> tighter integration in the last case.
>
> My first attempt at this was the interact.py plugin which attempted to use 
> subprocess.Popen to interact with bash / R / psql / whatever.  It worked ok, 
> but not ok enough to be smooth for everyday use.
>
> Here's a new approach, which assumes you use 'screen', the shell session 
> manager / switcher.  If you're not, you should be.

Sigh, another learning curve, but certainly looks worth some effort.
do you know about https://launchpad.net/byobu ?


>
> Basically this just streamlines the whole process of pasting commands from 
> Leo to the shell window, and optionally pasting results back in to Leo as a 
> record of what happened.
>
> leoscreen.py - interact with shell apps. via screen
> ===================================================
>
> (an simpler alternative to interact.py)
>
> Analysis environments like SQL, R, scipy, ipython, etc. can be
> used by pasting sections of text from an editor (Leo) and a
> shell window.  Results can be pasted back into the editor.
>
> This plugin streamlines the process by communicating with ``screen``,
> the shell multiplexer
>
> Commands created
> ----------------
>
> leoscreen-run-text
>  Send the text selected in Leo's body text to the shell app.
> leoscreen-get-line
>  Insert a line of the last result from the shell into Leo's body text
>  at the current insert point.  Lines are pulled one at a time starting
>  from the end of the output.
> leoscreen-next
>  Switch screen session to next window.
> leoscreen-prev
>  Switch screen session to preceeding window.
> leoscreen-other
>  Switch screen session to last window displayed.
>
> **IMPORTANT IMPLEMENTATION NOTE**: screen behave's differently
> if screen -X is executed with the same stdout as the target
> screen, vs. a different stdout.  Although stdout is ignored,
> Popen() needs to ensure it's not just inherited.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "leo-editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/leo-editor?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to