I would like to know how to use "subprocess module" to rewrite the following code:
import commands
print commands.getoutput('convert -quality 100 ___t*.png images/transient_heat.gif')
print commands.getoutput('rm ___t*.png')
Because "commands module" does not support Python 3, I would like to use "subprocess module". I tried the following code but it does not work.
import subprocess
print ( subprocess.Popen('convert -quality 100 ___t*.png images/transient_heat.gif') )
print ( subprocess.Popen('rm ___t*.png') )
Thank you very much! The code was originally taken from Kitchin's blog: http://kitchingroup.cheme.cmu.edu/blog/2013/03/07/Transient-heat-conduction-partial-differential-equations/