Nathaniel Smith wrote:
On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing wrote:
output(args) --> (status, output)
Isn't this already available as: run(args, stdout=PIPE)?
Yes, but you need to do more than that to get the output
as a string. This is the relevant part of the implementation
of
On Thu, Apr 4, 2019 at 1:59 AM Greg Ewing wrote:
>
> Nathaniel Smith wrote:
> > On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing
> > wrote:
> >>output(args) --> (status, output)
> >
> > Isn't this already available as: run(args, stdout=PIPE)?
>
> Yes, but you need to do more than that to get the
On Thu, Apr 04, 2019 at 07:44:29PM +1100, Chris Angelico
wrote:
> On Thu, Apr 4, 2019 at 7:12 PM Nathaniel Smith wrote:
> >
> > On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing
> > wrote:
> > >
> > > The check_output() function of the subprocess module raises an
> > > exception if the process
On Thu, Apr 4, 2019 at 8:02 PM Greg Ewing wrote:
>
> Chris Angelico wrote:
> > +1 on adding a nice simple function, although I'm not 100% sold on the
> > name "output".
>
> The idea is that output/check_output would go together like
> call/check_call.
>
Yeah, so I think that on balance it's
The check_output() function of the subprocess module raises an
exception if the process returns a non-zero exit status. This is
inconvenient for commands such as grep that use the return
status to indicate something other than success or failure.
The check_call() function has a companion call(),
04.04.19 11:59, Greg Ewing пише:
Nathaniel Smith wrote:
On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing
wrote:
output(args) --> (status, output)
Isn't this already available as: run(args, stdout=PIPE)?
Yes, but you need to do more than that to get the output
as a string. This is the relevant
On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing wrote:
>
> The check_output() function of the subprocess module raises an
> exception if the process returns a non-zero exit status. This is
> inconvenient for commands such as grep that use the return
> status to indicate something other than success or
On Thu, Apr 4, 2019 at 7:12 PM Nathaniel Smith wrote:
>
> On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing
> wrote:
> >
> > The check_output() function of the subprocess module raises an
> > exception if the process returns a non-zero exit status. This is
> > inconvenient for commands such as grep
Chris Angelico wrote:
+1 on adding a nice simple function, although I'm not 100% sold on the
name "output".
The idea is that output/check_output would go together like
call/check_call.
--
Greg
___
Python-ideas mailing list
Python-ideas@python.org
Let’s please leave this alone. As Serhiy says run() covers everything.
On Thu, Apr 4, 2019 at 3:03 AM Oleg Broytman wrote:
> On Thu, Apr 04, 2019 at 07:44:29PM +1100, Chris Angelico
> wrote:
> > On Thu, Apr 4, 2019 at 7:12 PM Nathaniel Smith wrote:
> > >
> > > On Thu, Apr 4, 2019 at 12:48 AM
10 matches
Mail list logo