Marc 'BlackJack' Rintsch schreef:
What do you expect this to to? Writing a byte to the file and you don't
know which value this byte has?
Ciao,
Marc 'BlackJack' Rintsch
ok let me explain this a bit more...
I want to use a program that has a 'pipe' mode, in which you can use
stdin to send commands to the program. I found out that, when in pipe
mode and you are using the keyboard as input source you can do Ctrl-D to
'signal' the program that you have finished typing your command. The
program parses and then performs the command, and it doesn't quit. It
quits after 'Quit\n' + Ctrl-D
Now I want a python script to provide the input, how do i do that? I now
use popen to be able to write to the program's stdin (p_stdin)
I noticed that when i do a p_stdin.close() it acts as a 'ctrl-d' in that
the program recognizes the signal to process the command, but then I
cannot use p_stdin anymore to do p_stdin.write(...)
grts,
ruben