If it vanishes, it implies a segfault which you will probably see if you run idle form the command line. You should be able to get a backtrace by running idle through gdb, i.e, from the command line, run "gdb idle". Then in gdb type "run". Idle should start as usual, so get it to crash.  Then within gdb type "bt". This will give a backtrace which will hopefully at least point to whether its python, pyqt or qt.<div>
<br></div><div>David<br><div><br></div><div><div><div class="gmail_quote">On Thu, Jun 23, 2011 at 8:16 AM, Algis Kabaila <span dir="ltr"><<a href="mailto:akabaila@pcug.org.au">akabaila@pcug.org.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Thu, 23 Jun 2011 03:23:36 PM David Townshend wrote:<br>
> On Thu, Jun 23, 2011 at 6:14 AM, Algis Kabaila <<a href="mailto:akabaila@pcug.org.au">akabaila@pcug.org.au</a>> wrote:<br>
> > On Thu, 23 Jun 2011 08:17:04 AM Baz Walter wrote:<br>
> > > On 22/06/11 20:49, David Townshend wrote:<br>
> > > > On Wed, Jun 22, 2011 at 2:34 PM, Baz Walter<<a href="mailto:bazwal@ftml.net">bazwal@ftml.net</a>>  wrote:<br>
> > > >> according to the qt docs, only one application object should be<br>
> ><br>
> > created<br>
> ><br>
> > > >> at a time, and there is a global qApp pointer which refers to the<br>
> > > >> current instance.<br>
> > > >><br>
> > > >> this suggests that, in pyqt, something like the following should<br>
> > > >> work:<br>
> > > >><br>
> > > >> from PyQt4 import QtGui<br>
> > > >> QtGui.qApp = app = QtGui.QApplication([])<br>
> > > >> app.quit()<br>
> > > >> QtGui.qApp = app = None<br>
> > ><br>
> > > [snip]<br>
> > ><br>
> > > > I've investigated further and found that its caused by the gtk style<br>
> > > > which I am using, since I am running gnome. Simply changing the qt<br>
> ><br>
> > style<br>
> ><br>
> > > > avoids the problem. I recall reading about similar issues before with<br>
> > > > the gtk-qt style, so I think that this is a know problem.  However, I<br>
> > > > noticed that after changing the style, python still segfaults on<br>
> > > > exit. gdb indicates that it is something in the QApplication<br>
> > > > destructor, and it seems that deleting the<br>
> > > ><br>
> > > > instance after quitting solves this, e.g.:<br>
> > > >>>> from PyQt4.QtGui import QApplication<br>
> > > ><br>
> > > >>>> for i in range(10):<br>
> > > > ...     app = QApplication([])<br>
> > > > ...     app.quit()<br>
> > > > ...     del app<br>
> > > > ...<br>
> > > ><br>
> > > >>>> exit()<br>
> > > ><br>
> > > > I experimented a bit with setting qApp = None, but it didn't make a<br>
> > > > difference.<br>
> > ><br>
> > > my point was simply that you need to make sure you remove all<br>
> > > references to the current qpplication instance before creating a new<br>
> > > one.<br>
> > ><br>
> > > in general, setting qApp to the instance of qapplication isn't<br>
> > > necessary. but it's worth noting that qApp won't refer to the same<br>
> > > *pyqt* object unless it's explicitly over-written. this may become<br>
> > > relevant when working with subclasses of qapplication. of course, if<br>
> > > you don't use qApp, it won't make any difference, as you say ;-)<br>
> ><br>
> > Baz,<br>
> ><br>
> > This does not explain why the IDLE quits so early in the test, even<br>
> > before CR<br>
> > is pressed... Actually, in python3.2 if one programs in IDLE, one finds<br>
> > that<br>
> > IDLE is useless with PyQt as it quits (just vanishes from the screen...)<br>
> > if one tries to run a script after modifying it.  Basically, IDLE works<br>
> > only if<br>
> > it is invoked from scratch each time one wants to run a program.<br>
> ><br>
> > I suggest that because of such misbehaviour it is not useful to look for<br>
> > faults in the test case - there is a fault, either in Python3 IDLE,<br>
> > Python 3,<br>
> > PyQt, Qt itself.<br>
> ><br>
> > As for the PyQt bug tracker - I was not able to find it, though I saw bug<br>
> > reports in several places, though I said earlier that I did see it<br>
> > somewhere.<br>
> ><br>
> > I would write it down to my aging memory....<br>
> ><br>
> > OldAl.<br>
> > _______________________________________________<br>
> > PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
> > <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
><br>
> Baz - Sorry, I think I misunderstood you slightly, but I reached the same<br>
> conclusion - to delete all references to the instance.  I don't think that<br>
> omitting this should cause a segfault though, so it does look like a bug,<br>
> but at least its easy to work around.<br>
><br>
> OldAl - I don't get that behaviour.  Is this is linux or windows, have you<br>
> tried to get a backtrace to see where the problem is?  I have to admit I<br>
> never use IDLE, I much prefer the console interface, so I haven't had much<br>
> opportunity to see if this happens to me.<br>
><br>
> David<br>
</div></div>No backtrace possible - it's vanishing act of IDLE...  It only happens with<br>
IDLE for python 3 (3.2).  My os is kubuntu 11.04 "natty".  Sip and PyQt are<br>
compiled with python 3.2, but Qt is from debian (ubuntu) binaries.<br>
<br>
As I could not make use of IDLE, I compiled eric5 from source.  It is a really<br>
nice IDE!  [press "(" gives (), press "," - adds a space after it - and the<br>
code completion is only the beginning!] - free sales pitch.  It is free as in<br>
beer and OSS.<br>
<br>
Here are my system details:<br>
<div class="im">ak@supremo:~$ lsb_release -a<br>
No LSB modules are available.<br>
Distributor ID: Ubuntu<br>
Description:    Ubuntu 11.04<br>
Release:        11.04<br>
Codename:       natty<br>
ak@supremo:~$<br>
</div><div class="im">ak@supremo:~$ python3<br>
Python 3.2 (r32:88445, Mar 25 2011, 19:56:22)<br>
[GCC 4.5.2] on linux2<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
</div>>>> from PyQt4 import QtCore<br>
>>> QtCore.PYQT_VERSION_STR<br>
'4.8.4'<br>
>>> QtCore.QT_VERSION_STR<br>
'4.7.2'<br>
<br>
The key point is that IDLE is for Python3.2 and sip, PyQt are compiled with<br>
Python3.2.<br>
<br>
I have observed this kind of errant behaviour with PySide too.  (PySide does<br>
not yet have a Python3 version).<br>
<br>
OldAl.<br>
</blockquote></div><br></div></div></div>