help-octave
[Top][All Lists]
Advanced

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

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


From: andreas.naessl
Subject: [example] how to get popen2() working? [XP, MSVC 2.9.15-octave]
Date: Fri, 30 Nov 2007 23:35:04 +0100

| 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



reply via email to

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