From: Petr Mikulik <mikulik@ph...> - 2004-02-18 09:57:28
I've put to the "web page" section about bidirectional communication your
program <=> gnuplot: there is C, python and m with links to files with demo
Interestingly, the C program cannot be exactly copied into m. See those
there scripts there -- mkfifo blocks, and "set print" must be closed after
reading MOUSE_* variables from fifo. Someone has an idea?
BTW, it would be nice to have a "ginput.m" implementation for Octave --
somebody can do it?
And a demo for Java?
Well, ad to the above problem with fifo in Octave -- why the following in
bash does not work?
bash$ mkfifo cau
bash$ tail -f cau
and in another xterm:
gnuplot> set print "cau"
gnuplot> print "hello"
Only sometimes the text appears in the "tail", but always it gets flushed
after "set print" (closing print file) or quitting gnuplot -- and why it
works in the C demo without closing "set print"?
On Wednesday 18 February 2004 01:52 am, Petr Mikulik wrote:
> Well, ad to the above problem with fifo in Octave -- why the following
> in bash does not work?
> bash$ mkfifo cau
> bash$ tail -f cau
> and in another xterm:
> gnuplot> set print "cau"
> gnuplot> print "hello"
I think that "tail -f" does not behave as expected for pipes.
Maybe it tries to use fstat() to see if the file has been extended?
Anyhow the same sequence works for me if I use "cat"
rather than "tail -f".
Ethan A Merritt merritt@...
Biomolecular Structure Center (206)543-1421
University of Washington, Seattle, WA 98195
Get latest updates about Open Source Projects, Conferences and News.