feeding a prompt with python

Scott Gilbert xscottgjunk at yahoo.com
Fri Jun 28 16:42:42 EDT 2002


thomas <tom at huno.net> wrote in message news:<3D1C5341.9070001 at huno.net>...
> 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

Look at os.popen(some_cmd).  On unixy like places, it will give you a
file handle that you can write to.



More information about the Python-list mailing list