I'm trying to execute a shell command using Python's subprocess. This is how I do it:
pelican = 'pelican content -s /home/pelican/publishconf.pyt -D --ignore-cache'
subprocess.call(pelican, shell=True)
But the response is command not found
. It doesn't have a problem when I write in my command line.
My question is how can I execute a shell command using python that behaves just like I would type it in?