How to fix "TypeError: unsupported operand type(s)"?
<p>I'm trying to use var value in file.write function:</p>

<pre><code>profile = open("/tmp/%s.pcf", 'w+') % uid
</code></pre>

<p>and I get this error:</p>

<pre><code>TypeError: unsupported operand type(s) for %: 'file' and 'str'
</code></pre>

<p>Any idea what I'm doing wrong?</p>
