Python "constructor not accessible in restricted mode"
<p>This has been driving me crazy, on and off, for a few months.<br>
I'm developing an addon module for kodi (formerly xbmc), which is exclusively python.</p>

<p>Whenever I try to open a file, like so:</p>

<pre><code>file = open(self.msg_bdy_props["Filename"], "r")
</code></pre>

<p>This exception is thrown:</p>

<pre><code>IOError: file() constructor not accessible in restricted mode
</code></pre>

<p>From everything I've read, restricted mode is of a python era long past.  But there are obviously still parts of it lingering around?
I can't work around it this time, and I need to open and read files.<br>
Any idea what might be happening and how to get around this issue?
Thanks!</p>