Hi,<br>  Can somebody please help me with the issue of ".pyc" creating problems when we rerun the application, written using PythonQt ? The description of the problem is given below.<br><br>Regards,<br>Shankar<br>
<br><div class="gmail_quote">On Fri, Jun 27, 2008 at 2:41 PM, Shankar Narayana <<a href="mailto:shank.nasa@gmail.com">shank.nasa@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> I am newbie to PythonQt. I wanted to access the Qt objects created in C++ using Python and update things. I had a look at this URL "<a href="http://doc.trolltech.com/qq/qq23-pythonqt.html#decoratorsandcwrappers" target="_blank">http://doc.trolltech.com/qq/qq23-pythonqt.html#decoratorsandcwrappers</a>" which talks about using PythonQt for the same.<br>

  I followed the instructions given in the example. I created my cpp file and .py file and could make them working. <br>  But once after the first time after .pyc file is created, my program no longer executes. It is giving me a segmentation fault. If I remove my .pyc file and run the program, things work fine. <br>

<br>My cpp file<br>#include <QApplication><br>#include <QTextEdit><br>#include "PythonQt.h"<br>int main(int argc, char* argv[])<br>{<br>    QApplication app(argc,argv);<br>    QTextEdit *welcomemsg = new QTextEdit("Hi whatsup");<br>

    PythonQt::init(); 
<br>    PythonQtObjectPtr mainModule = PythonQt::self()->getMainModule();<br>    mainModule.addObject("welcomemsg",welcomemsg);  // Check with different names<br>    mainModule.evalFile("Pyscript.py");<br>

    mainModule.removeVariable("welcomemsg");<br>    PythonQt::cleanup(); <br>    return app.exec();<br>}<br><br>My Python file  (Pyscript.py)<br><br>from PythonQt import *<br>#append the text to the existing text edit<br>

welcomemsg.append("Hurray I did it")<br>welcomemsg.show()<br><br>Can somebody help me what makes this not to run once Python interpreter works on the Python file and creates a .pyc file ?<br> <br><br>Regards,<br>
<font color="#888888">
Shankar<br>
</font></blockquote></div><br>