help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave's graphics interface / linux operating system


From: Sergei Steshenko
Subject: Re: octave's graphics interface / linux operating system
Date: Wed, 14 May 2008 23:11:18 -0700 (PDT)

--- Dieter Jurzitza <address@hidden> wrote:

> Hi Sergei,
> did you test what you suggested? I get tons of messages about broken pipes - 
> nothing that could be used, seriously.
> Thanks for the hint, anyway,
> take care
> 
> 
> 
> 
> Dieter
> 
> -- 
> -----------------------------------------------------------
> 
>                                |
>                                 \
>                  /\_/\           |
>                 | ~x~ |/-----\   /
>                  \   /-       \_/
>   ^^__   _        /  _  ____   /
>  <°°__ \- \_/     |  |/    |  |
>   ||  ||         _| _|    _| _|
> 
> if you really want to see the pictures above - use some font
> with constant spacing like courier! :-)
> -----------------------------------------------------------Am Mittwoch, 14. 
> Mai 2008 03:03:20 schrieb Sergei Steshenko:
> ***********
> > What about
> >
> > gnuplot_binary("| tee gnuplot_input.txt | gnuplot");
> >
> > - "gnuplot_input.txt" above is what is sent to 'gnuplot'.
> *******
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
> 

Sorry, there are two problems.

The first of them is obvious - a redundant '|' in the beginning.


I.e. it was meant to be:

gnuplot_binary("tee gnuplot_input.txt | gnuplot");
.

The second problem is severe, and it is related to the 'octave' calls 'gnuplot'.

To investigate the second problem I replaced 'tee' with a junk script of mine:

#!/usr/bin/perl -w

$| = 1;

my $_file = $ARGV[0];

warn "address@hidden@ARGV";

open(my $_fh, ">", $_file) or die "could not open '$_file' for writing";

while(defined(my $line = <STDIN>))
  {
  print $_fh, $line;
  print STDOUT $line;
  print STDERR "STDERR: $line";
  }
.

This is what is happening in 'octave':

"
octave:1> old_val = gnuplot_binary("/usr/bin/perl -w 
/mnt/sda8/sergei/try_tee/tee.pl AAAAAA.txt")
old_val = gnuplot
octave:2> y = 0:1000;
octave:3> plot(y);
@ARGV=AAAAAA.txt at /mnt/sda8/sergei/try_tee/tee.pl line 7.
@ARGV=AAAAAA.txt --version at /mnt/sda8/sergei/try_tee/tee.pl line 7.
"

and 'octave' hangs, which is OK in this case since it expects output from 
'gnuplot'.

The above output means the following:

1)
@ARGV=AAAAAA.txt at /mnt/sda8/sergei/try_tee/tee.pl line 7.

- 'gnuplot' (rather, what's been given through 'gnuplot_binary') is called 
first time with
no arguments - the "@ARGV=AAAAAA.txt" comes from the command supplied through 
'gnuplot_binary'

2)
@ARGV=AAAAAA.txt --version at /mnt/sda8/sergei/try_tee/tee.pl line 7.

- gnuplot impersonator is called again, with --version command line argument.

So here I see the conceptual problem of my proposal - I assumed communication 
with
'gnuplot' was happening only through STDIN/STDOUT, not using its command line 
arguments,
and that assumption was wrong.

Regards,
  Sergei.


Applications From Scratch: http://appsfromscratch.berlios.de/


      


reply via email to

[Prev in Thread] Current Thread [Next in Thread]