Skip to main content
Source Link

Prepending the Linux command timeout isn't a bad workaround and it worked for me.

cmd = "timeout 20 "+ cmd subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) (output, err) = p.communicate() 
Post Made Community Wiki by Vikram Hosakote