os.popen2 :URGENT

Ali Dada afd00 at aub.edu.lb
Tue May 27 14:19:21 EDT 2003


hi all:

small but very urgent question (project rpesentation tommorow!!!)

i need to call a command line program from python, but the program prompts for a
user input ('y' for yes or 'n' for no). how can i write, using python, one of
those values???

i thought of using something like os.popen('my_program')[1].write('y')

but it didn't work, the program said: received broken pipe signal

what should i do????

thanks a lot....










More information about the Python-list mailing list