From: Robert Yang <liezhi.yang@windriver.com>
To: Chris Larson <clarson@kergoth.com>
Cc: bitbake-devel@lists.openembedded.org, Zhenfeng.Zhao@windriver.com
Subject: Re: [PATCH 2/2] replace os.popen with subprocess.Popen
Date: Wed, 16 May 2012 09:29:02 +0800 [thread overview]
Message-ID: <4FB302DE.4030903@windriver.com> (raw)
In-Reply-To: <CABcZANkHOAe0Fx8hG+_5m-z6jLHNV1hKu2vv01T_TsY1u4H6jA@mail.gmail.com>
On 05/15/2012 10:43 PM, Chris Larson wrote:
> On Tue, May 15, 2012 at 2:53 AM, Robert Yang<liezhi.yang@windriver.com> wrote:
>> - p4file = os.popen("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot))
>> + p4file = Popen("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot)).stdout
>> cset = p4file.readline().strip()
>
> When all that's being done is reading the output of the command, I'd
> think bb.process.run() would do the job, rather than manually using
Thanks, the bb.process.run() would be better, I will send the V3 sooner.
// Robert
> Popen, no? Once we require python 2.7, we can use
> subprocess.check_output() instead, of course.
next prev parent reply other threads:[~2012-05-16 1:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 9:53 [PATCH 0/2] V2 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-15 9:53 ` [PATCH 1/2] replace os.system with subprocess.call Robert Yang
2012-05-15 9:53 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-15 14:43 ` Chris Larson
2012-05-16 1:29 ` Robert Yang [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-20 12:36 [PATCH 0/2] V4 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-20 12:36 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-29 14:58 ` Wang, Shane
2012-05-29 15:17 ` Wang, Shane
2012-05-30 1:02 ` Robert Yang
2012-05-30 1:10 ` Wang, Shane
2012-05-16 5:55 [PATCH 0/2] V3 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-16 5:55 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-16 9:35 ` GOPIKRISHNAN S
2012-05-16 14:14 ` Chris Larson
2012-05-17 1:59 ` Robert Yang
2012-05-14 8:07 [PATCH 0/2] replace os.system and os.popen with subbprocess module Robert Yang
2012-05-14 8:07 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-14 13:59 ` Chris Larson
2012-05-15 6:49 ` Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB302DE.4030903@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=Zhenfeng.Zhao@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=clarson@kergoth.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox