feeding a prompt with python

Andreas Ulbrich ulbi at ivs.tu-berlin.de
Fri Jun 28 17:11:28 CEST 2002


thomas wrote:
> hello,
> 
> is there a way with python to feed a prompt with data? i call sth. with 
> system($some_cmd) and the cmd gives me a prompt which of course waits 
> for user input. however i want to automate this, is there a way?
> i browsed through the essential reference 2nd edt. but didn't find 
> anything.
> 
> thx,
> thomas
> 

What you actually want to do is using pipes. See os.popen and related 
stuff for documentation.




More information about the Python-list mailing list