On Tue, 16 Aug 2011 15:57:02 -0700 (PDT) jeff aigner <[email protected]> wrote:
> I'm looking into building a framework around system tools using Leo. > The basic concept would be that Leo would execute commands (via a > thread/subprocess), and receive some sort of callback once the process > has exited, and then use information gathered while the process was > running to create / update nodes in the outline. I tried something like that with subprocess I think, never got the synchronization sufficiently tight. Maybe my use case was slightly different, I was wanting to interact with tty driven apps like R and postgres. What I do now, which works really well, is use the unix `screen` program to handle the interaction with the tty, seeing it can push things back into the tty as if typed as well as collect text from it. I wrote the leoscreen.py plugin on that basis. Of course, requires you're using screen. Also be aware of leoremote.py plugin which allows execution of arbitrary code in a running Leo from another process. There might also be some useful stuff in the geotag plugin which maintains communication with a google map in a browser via a http server thread. Cheers -Terry -- 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.
