Any ideas anyone ? 

-----Original Message-----
From: bangpypers-bounces+nikunj.badjatya=emc....@python.org 
[mailto:bangpypers-bounces+nikunj.badjatya=emc....@python.org] On Behalf Of 
nikunj.badja...@emc.com
Sent: Tuesday, February 21, 2012 3:00 PM
To: mandarv...@gmail.com; bangpypers@python.org
Subject: Re: [BangPypers] Using subprocess - Extra '0' on the console

No I am not printing anything.


From: Mandar Vaze / मंदार वझे [mailto:mandarv...@gmail.com]
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, 
<nikunj.badja...@emc.com<mailto:nikunj.badja...@emc.com>> 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
BangPypers@python.org<mailto:BangPypers@python.org>
http://mail.python.org/mailman/listinfo/bangpypers

_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to