Python can't open symlinked file
<p>Python is unable to open my simlinked file. I made sure the file exists and I can access it. I was under the impression that symlinks are resolved on the OS level so Python would never know about it.</p>

<pre><code>therold@therold:~/Programming/ML/deeptank/dataset/inc (master)$ ls -lisa  /Users/therold/Programming/ML/deeptank/dataset/inc/training/tanks/matilda-iv_689.png
7870541 8 lrwxr-xr-x  1 therold  staff  46 13 Mai 16:44 /Users/therold/Programming/ML/deeptank/dataset/inc/training/tanks/matilda-iv_689.png -&gt; ../training_data/matilda-iv/matilda-iv_689.png
</code></pre>

<p>OSX is clearly able resolve the symlinked image file. However the Python <code>open()</code> method fails me:</p>

<pre><code>therold@therold:~/Programming/ML/deeptank/dataset/inc (master)$ python
Python 2.7.10 (default, Sep 23 2015, 04:34:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
&gt;&gt;&gt; open("/Users/therold/Programming/ML/deeptank/dataset/inc/training/tanks/matilda-iv_689.png")
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
IOError: [Errno 2] No such file or directory: '/Users/therold/Programming/ML/deeptank/dataset/inc/training/tanks/matilda-iv_689.png'
&gt;&gt;&gt;
</code></pre>

<p>Any ideas what I am doing wrong? Help is much appreciated.</p>