I have a string called variable and need to do the subprocess equivalent of os.system. I've tried to find a way to do this but have only found:
variable2 = subprocess.Popen(args, stdout=subprocess.PIPE)
print variable2.communicate()[0]
However, I'm having trouble understanding how to use it. How do I achieve my goal?
argshere? In Py3,printis a function, not a statement.