That is a bit tricky indeed. Actually the external console has its own mechanism for providing code instropection remotely: that is a notifying server communicating with a monitor (all of it being initialized in the local sitecustomize script). The monitor is running in a separate thread (Thread module) whereas the server is running in a QThread... (because we need to emit/connect a SIGNAL inside of it) that's why PyQt4 is imported before you do in your own program.
Currently there is no workaround for this particular issue. Getting rid of PyQt4 in the sitecustomize script means losing the ability to send SIGNALs from the notifying server... I'll have to take a look at it to see if I can do without these signals. Pierre On Jun 10, 11:48 pm, Gertwin <[email protected]> wrote: > I try to run my program in the external console, but it seems to use > the api setting (version 1) from spyder. > I am using the external console because it will run in its own > process. > With the internal console I expect this error. > Outside spyder it runs OK. > > Traceback (most recent call last): > File "/home/gertwin/work/pythoncad/PythonCAD/pythoncad_qt.py", line > 5, in <module> > sip.setapi('QString', 2) > ValueError: API 'QString' has already been set to version 1 > > Is there a way to work around this problem? > > Thanks, > Gertwin -- You received this message because you are subscribed to the Google Groups "spyder" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
