On Mon, Dec 14, 2009 at 10:04 AM, murugadoss <murugadoss2...@gmail.com>wrote:

> Hello,
>   I am new to python scripting. I saw about subprocess module. I need to
> send an input to the running src,like
>
> eg: For adding two numbers
>       1. image running and waiting for input from user
>        2. input 1
>       3. input 2
>
> eg:
> ./add.src
> 2
> 3
> Can u please give me some more input how to pass there inputs



You can write to the stdin of a running process. Did you look at the docs?
Check out the communicate method of the Popen objects. There's also this
that you might find useful
http://blog.doughellmann.com/2007/07/pymotw-subprocess.html

-- 
~noufal
http://nibrahim.net.in
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to