diff --git a/cowsay.py b/cowsay.py index 593cd8b..7f80be7 100644 --- a/cowsay.py +++ b/cowsay.py @@ -14,7 +14,9 @@ def cowsay(msg,args): return try: - txt=subprocess.check_call(["cowsay","-f",cowfile,text]) + p=subprocess.Popen(["cowsay","-f",cowfile,text],stdout=subprocess.PIPE) + p.wait() + txt=p.stdout.read() for line in txt.split('\n'): #brathuhn.sendStyledMsg(brathuhn.ROOM,line,'groupchat',) brathuhn.sendMonoMsg(brathuhn.ROOM,line,'groupchat')