Best way to rewrite Popen
Thomas 'PointedEars' Lahn
PointedEars at web.de
Tue May 19 21:23:06 EDT 2015
Cecil Westerhof wrote:
> At the moment I am playing with things like:
> p = subprocess.Popen('ls -l', shell = True, stdout = subprocess.PIPE)
>
> I think that most of the times this are the values I want. So it would
> be nice to overrule the defaults. What is the best way to do this?
> So creating a function that is exactly the same except for the defaults
> for shell and stdout (and maybe stderr).
As always in OOP: override the method and call that of the superclass
in yours.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
More information about the Python-list
mailing list