Python3: File path problems <p>Suppose my <code>Python3</code> project structure is :</p> <pre><code>Project | App.py | AFolder | | tool.py | | token.json </code></pre> <p>In <code>tool.py</code>, I use <code>os.path.exists('token.json')</code> to check whether the Json file exits. As expected, it returns <strong>true</strong>.</p> <pre><code>def check(): return os.path.exists('token.json') </code></pre> <p>However, when I call this in <code>App.py</code>, it returns <strong>false</strong>. </p> <p>It seems file path is different when calling functions between modules. How to solve it ?</p>