Safe ways of using os.system
<p>I have a program which retrieves information from a feed (say, a download link), and then downloads it. I also wish to provide for the user to use her own download handler. In general, I would like to allow the user to provide an instruction with several placeholders (such as <code>{link}</code>, <code>{directory}</code> and the like), and execute it.</p>

<p>The relevant bit of what I have now is</p>

<pre><code>instruction = value.format(link = link, filename = filename, 
                           directory = directory, fullpath = fullpath, 
                           title = title)
os.system(instruction)
</code></pre>

<p>This is probably all sorts of wrong, as nothing forbids <code>value</code> from simply erasing all user data, or some such. What is the right way to do this?</p>
