Since os.popen is deprecated and replaced by subprocess.Popen, how can I convert this code:
os.popen('swfdump /tmp/filename.swf -d')
to use subprocess.Popen properly? I tried:
subprocess.Popen("swfdump /tmp/filename.swf -d")
subprocess.Popen("swfdump %s -d" % (filename))
but it doesn’t seem to work correctly. What is the right way to use subprocess.Popen with commands and variables like this?