Re: [Tutor] Question about subprocess

2014-01-11 Thread Steven D'Aprano
On Sat, Jan 11, 2014 at 04:26:00AM -0500, eryksun wrote: > On Sat, Jan 11, 2014 at 12:51 AM, Steven D'Aprano wrote: > > > >> However, when I writed it into a .py file and execute the .py file, it > >> blocked at "temp=p.readline()". > > > > Of course it does. You haven't actually called the .exe f

Re: [Tutor] Question about subprocess

2014-01-11 Thread eryksun
On Fri, Jan 10, 2014 at 11:48 PM, daedae11 wrote: > p = subprocess.Popen(['E:/EntTools/360EntSignHelper.exe', > 'E:/build/temp/RemoteAssistSetup.exe'], > stdout=subprocess.PIPE, shell=True).stdout Is 360EntSignHelper supposed to run RemoteAssistSetup as a child process? O

Re: [Tutor] Question about subprocess

2014-01-11 Thread eryksun
On Sat, Jan 11, 2014 at 12:51 AM, Steven D'Aprano wrote: > >> However, when I writed it into a .py file and execute the .py file, it >> blocked at "temp=p.readline()". > > Of course it does. You haven't actually called the .exe file, all you > have done is created a Popen instance and then grabbed

Re: [Tutor] Question about subprocess

2014-01-11 Thread eryksun
On Sat, Jan 11, 2014 at 12:46 AM, Danny Yoo wrote: > There is a warning in the documentation on subprocess that might be > relevant to your situation: > > Warning: > Use communicate() rather than .stdin.write, .stdout.read or > .stderr.read to avoid deadlocks due to any of the other OS pip

Re: [Tutor] Question about subprocess

2014-01-10 Thread Steven D'Aprano
On Sat, Jan 11, 2014 at 12:48:13PM +0800, daedae11 wrote: > p = subprocess.Popen(['E:/EntTools/360EntSignHelper.exe', > 'E:/build/temp/RemoteAssistSetup.exe'], > stdout=subprocess.PIPE, shell=True).stdout > temp = p.readline(); > print temp > p.close() > > When I run the

Re: [Tutor] Question about subprocess

2014-01-10 Thread Danny Yoo
There is a warning in the documentation on subprocess that might be relevant to your situation: Warning: Use communicate() rather than .stdin.write, .stdout.read or .stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process. Reference