rapper aroundos.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:>> -> import commands>
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
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---