On Monday, 26 November 2012 21:10:02 UTC+5:30, Miki Tebeka  wrote:
> > But i dont know how to pass the "echo t | " in subprocess.check_output 
> > while calling a process.
> 
> You need to create two subprocess and connect the stdout of the first to the 
> stdin of the 2'nd.
> 
> 
> 
> See http://pythonwise.blogspot.com/2008/08/pipe.html for a possible solution.

Hi Miki,
Thanks.. Creating two subprocesses worked for me. I did the code as below,

p = subprocess.Popen("echo t |", shell=True, stdin=subprocess.PIPE, 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
p1 = subprocess.Popen(["svn.exe", "list", "Https://127.0.0.1:443/svn/Repos"], 
shell=True, stdin=p.stdout, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE).communicate()
output = p1[0]

Thanks again... :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to