<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:12pt;font-family:Monospace">
<p><span style="color:#008000">&gt; &gt;&gt;&gt; import xcb</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; import render</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; c = xcb.Connection()</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; win = c.generate_id()</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; r = c.get_render_extension() # new method, checking whether</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; render</span></p>
<p><span style="color:#008000">&gt;</span></p>
<p><span style="color:#008000">&gt; ext. exists</span></p>
<p><span style="color:#008000">&gt;</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; r.create_picture(...) # no need to add 'c' explicitly since it</span></p>
<p><span style="color:#008000">&gt; &gt;&gt;&gt; can</span></p>
<p></p>
<p>This does not really solve the problem because c would need to have a &quot;get_render_extension&quot; function right from the start. Which means that I need to program all possible extensions into the basic connection object.</p>
<p></p>
<p><span style="color:#008000">If I just tourn your example around, e.g.</span></p>
<p><span style="color:#008000">&gt;&gt;&gt; import render</span></p>
<p><span style="color:#008000">&gt;&gt;&gt; r = render.from_connection(c)</span></p>
<p></p>
<p>It would solve the problem. So: thanks a lot!</p>
<p></p>
<p>Tom</p>
<p></p>
</body></html>