|
From: Ethan A M. <merritt@u.washington.edu> - 2006-04-01 22:48:33
|
On Saturday 01 April 2006 02:24 pm, you wrote:
> Also, "obsession" is a hostile term to use. Despite this being April 1st, I
> will try and keep the snark escalation under control.
Sorry. No offense intended.
I think the thread messages arrived here out of order.
After I responded to the first in which I saw the "set term fd <fd>"
proposal, I saw two more with the same proposal and no mention of
my first response. But they may well have been sent earlier and
arrived later.
> > If you need a communication channel aside from stdin/stdout,
> > create a named pipe and use "set output" to pass its name.
>
> Why on earth might it matter whether I use mkfifo or a pipe like that?
Because if it's a named pipe, it can be used with the existing
"set output" mechanism for 2-way communication. There are several
old threads discussing this, and I think at least one bit of sample
code on the web site showing how this can be used to drive gnuplot
from python code.
> It's not like I'm doing something crazy like serving the results via https.
Passing a file descriptor by number via stdin to another process sounds
crazy to me. If it's a child process you might as well just
let it inherit the file descriptor directly, similar to the piping
between gnuplot and gnuplot_x11. If it's not a child process, let's just
say there is some question whether the number will be of any use.
If for some reason you don't want to create a named pipe,
then on current linux systems you could try
set output "/proc/${pid}/fd/whatever"
To me that seems ugly also, but less ugly than passing a bare number
via stdin. I haven't ever tried this however, so I am not sure what
extra wrinkles (buffering? permissions?) might arise.
> It's not like I'm doing something crazy like encoding the results in
> XML. That's svg.trm's job.
Heh.
So, given the date, you think someone should start writing
a flash.trm instead?
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|