How to know a file exists in the Desktop using Python on Mac OS?
<p>I would like to see whether a file is on the desktop in Mac OS and I write the code:</p>

<pre><code>if path.exists('~/Desktop/AZDif.png'):
    print 'Yes'
else:
    print 'No, the file is not there'
</code></pre>

<p>I see the file is not in the Desktop while it was actually there. How to write the code properly ?</p>