<div dir="ltr"><div><div><div>Ok, that's too bad :(<br></div>So I guess for now I'll keep a single interpreter for the whole time, and if it ever gets fixed I'll be able to start/stop the interpreter ...<br><br></div>Thanks anyway,<br><br></div>Pierre<br></div><br><div class="gmail_quote">On Mon, 18 May 2015 at 19:32 Phil Thompson <<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 18/05/2015 6:19 pm, Pierre Barbier de Reuille wrote:<br>
> Hi,<br>
><br>
> I have a C++ application that can be scripted with Python. As the<br>
> scripting<br>
> is very localized in time, I had originally chosen to initialize the<br>
> interpreter before each script, and finalize it after each script.<br>
><br>
> This worked very well until I tried to use PyQt5 in my scripts! If I do<br>
> that, it works the first time, but on the next initialization, all the<br>
> modules are close to empty. In particular, they don't have any classes!<br>
><br>
> As a temporary solution, I initialize the interpreter once at the start<br>
> of<br>
> my application, and re-use it over and over. But this is not ideal! In<br>
> particular, that would allow for resources leaks, which I would like to<br>
> avoid. Is this a known issue with PyQt? Is there something I can do to<br>
> make<br>
> this work?<br>
<br>
Neither sip or PyQt do a very good job about tidying up on finalisation.<br>
There is no one specific thing - just lots of little ones. Fixing it has<br>
just been low priority.<br>
<br>
Phil<br>
_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></blockquote></div>