help-octave
[Top][All Lists]
Advanced

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

Re: [example] how to get popen2() working? [XP, MSVC 2.9.15-octave]


From: Muthiah Annamalai
Subject: Re: [example] how to get popen2() working? [XP, MSVC 2.9.15-octave]
Date: Fri, 30 Nov 2007 17:58:42 -0600
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

andreas.naessl wrote:
| Does
| | fputs (a, "0\n");
| fflush (a);
| fgets (b)
|
| work?
| | jwe

john,
thanks. the additional "fflush(a)" does not help.
hm. do you have any idea, why i don't get anything back,
when i execute the same statements in a m-file ?
regards, andreas.

octave.exe:6> [a,b,i]=popen2('python','svr_02.py')
octave.exe:7> fputs(a,"test_cmd\n")
octave.exe:8> fgets(b)         # ans = got command  test_cmd
octave.exe:9> fputs(a,"0\n")
octave.exe:10> fflush (a)      # ans = 0
octave.exe:11> fgets (b)       # ans = -1, still...
octave.exe:12> fclear(b)
octave.exe:13> fgets(b)        # ans = got command  0

___________
did you read
octave> help popen2

it has some examples. See if they work from a script.

-Muthu




reply via email to

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