These are the two scripts (on my desktop)
subprocess_convert1.py
Code: Select all
#!/opt/local/bin/python3.6
import subprocess
cmd = ['/usr/local/bin/convert','-size','30x40','xc:white','-fill','white','-fill','black','-font','Arial','-pointsize','40','-gravity','South','-draw',"text 0,0 'P'",'/Users/fred/desktop/draw_text1.gif']
subprocess.call(cmd, shell=False)
subprocess_convert2.py
Code: Select all
#!/opt/local/bin/python3.6
import subprocess
cmd = '/usr/local/bin/convert -size 30x40 xc:white -fill white -fill black -font Arial -pointsize 40 -gravity South -draw "text 0,0 \'P\'" /Users/fred/desktop/draw_text2.gif'
subprocess.call(cmd, shell=True)
Code: Select all
python3.6 subprocess_convert1.py
or
python3.6 subprocess_convert2.py