Unexpected end of file error while opening a file via os.system
<pre><code> f = urllib.urlopen(url) #Download the file


 localFile = open(url.split('/')[-1],'w')

 localFile.write(f.read())
 os.system("transmission %s" %localFile)
</code></pre>

<p>Error I get is this:</p>

<pre><code>sh: Syntax error: end of file unexpected
512
</code></pre>
