Any ideas anyone ?
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, February 21, 2012 3:00 PM To: [email protected]; [email protected] Subject: Re: [BangPypers] Using subprocess - Extra '0' on the console No I am not printing anything. From: Mandar Vaze / मंदार वझे [mailto:[email protected]] Sent: Tuesday, February 21, 2012 2:55 PM To: Badjatya, Nikunj Subject: Re: [BangPypers] Using subprocess - Extra '0' on the console It is possible that this "zero" is return value i.e. success indicator Are you printing "Status" -Mandar On Tue, Feb 21, 2012 at 2:32 PM, <[email protected]<mailto:[email protected]>> wrote: Hi, I am using subprocess module to run a powershell script with necessary arguments. I also want to wait for this process to be over. The following statements works fine functionality wise. Program.py:- {{{ Ret = Popen([powershellpath, argslist]) Status = Ret.communicate() }}} Previously I was using threading.Thread() and subprocess.call() togethar to carry out this task. But after using only Popen, I am noticing a extra '0' coming on the console in the new line. Console:- {{{ This is intended msg1 0 This is intended msg2 }}} As you see, 1 new line and 1 extra '0' is coming on the console. I checked thoroughly and I think its coming only after I used Popen(). Any ideas how to avoid this .? Thanks, Nikunj 7 Switch off as you go | qRecycle always | P Save Paper - Save Trees | Go Green _______________________________________________ BangPypers mailing list [email protected]<mailto:[email protected]> http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
