Hm. It sounds like your company would be better off developing a
library of handy tools that it uses over and over, instead of on the
one hand using only standard library, and then if the standard library
doesn't provide the feature you need, proposing a patch.
I wouldn't be so critical if I thoug
Because it is a great way to consistently use popen(). Rather than write something specific each time, our site/company prefers to use commands to keep it all consistent.-brad
On 7/5/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
Since commands.getstatusoutput() is such a trivial wrapper aroundos
Since commands.getstatusoutput() is such a trivial wrapper around
os.popen(), why bother patching commands.py?
On 7/5/06, Brad Doctor <[EMAIL PROTECTED]> wrote:
> Greetings all,
>
> I have attached a patch for commands.py to provide a callback ability.
> Example use:
>
> --
Cool, thank you Fredrik -- going there now.-bradOn 7/5/06, Fredrik Lundh <[EMAIL PROTECTED]
> wrote:Brad Doctor wrote:> I am not sure if this is the proper forum or means to submit something
> like this, so please forgive me and advise accordingly if I am in error.to make sure that they don't just
Brad Doctor wrote:
> I am not sure if this is the proper forum or means to submit something
> like this, so please forgive me and advise accordingly if I am in error.
to make sure that they don't just disappear under a zillion other mails,
patches should be submitted to the patch tracker:
Greetings all,I have attached a patch for commands.py to provide a callback ability. Example use:-import commandscmd = 'top -b -n2'def fancy(out):
print 'GOT(%s)' % out.strip()commands.cb = fancy(s,o) = commands.getstatusoutput(cmd)print 'OUTPUT (%s)' % o---