Handling "with open()" errors?
<p>So I got this code here:</p>

<pre><code>with open(os.path.join(Path, 'ki/lol/kappa/file.txt'), 'r') as masterfile:
</code></pre>

<p>How can I add a function that tells the user that the file "file.txt" was not found in this directory? I get an error which is called <code>IOError [Errno 2] No such file in this directory</code> after starting my program. How can I show a message like "No file found here" instead of having this error appearing?</p>