Hi there,
I was wondering whether it was possible for a textmate bundle to launch an external process, and then when triggered, could send some text to the process (for example, using standard streams) and then do something with the information that the process spits out.
Now I know you can do this whole workflow for each command, i.e. you could read the current line, pass it as parameters to a command, and then replace the line with the output of the program.
What I want to do is to have the process persist over command triggers. i.e. One trigger might start the process, another might feed it information and do something with the response (this command may be called multiple times, and each time it would communicate with the same process, rather than create a new process), and a final trigger might end the process.
Is this at all possible?
Thanks, Sam Aaron
--
On Oct 6, 2006, at 10:48 AM, sam aaron wrote:
Hi there,
What I want to do is to have the process persist over command triggers. i.e. One trigger might start the process, another might feed it information and do something with the response (this command may be called multiple times, and each time it would communicate with the same process, rather than create a new process), and a final trigger might end the process.
This is something I've been wanting to do also, to use in the R Console and elsewhere. Allan told me that something like this should be possible via a "named pipe" (http://en.wikipedia.org/wiki/ Named_pipe), though I haven't had time to look closely into it.
Is this at all possible?
Thanks, Sam Aaron
Haris