+class PipeIdler(StringIdler):
+ def __init__(self, v, command, args):
+ text = "I ate my cookie...."
+ if os.access(command,os.F_OK|os.X_OK):
+ (stdout, stdin) = popen2.popen2(command+' '+args)
+ text = string.join(stdout.readlines())
+ stdout.close()
+ stdin.close()
+ StringIdler.__init__(self, v, text,repeat=False)
+
+ def affinity(self):
+ return 20
+