After installing Spyder 2.1.7 over python(xy) 2.7.2.1: Suprising and failing PyQt4 imports

13 views
Skip to first unread message

dnanz

unread,
Feb 15, 2012, 4:29:16 AM2/15/12
to python(x,y)
Since I upgraded Spyder I cannot consistently import PyQt4 anymore.

The following code

import PyQt4
print dir(PyQt4)

produces a variety of different outputs, depending on whether it is
run from idle*, stored in a file and run with F5 from within spyder**,
from an interpreter that is presented within spyder***, etc. Mostly,
attributes (not always the same) of PyQt4 are partly missing, which
leads to a failure of most of my programs... How can I correct this?

*
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'__path__']

**
['QtCore', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '__path__']

**
['QAxContainer', 'Qt', 'QtCore', 'QtDeclarative', 'QtDesigner',
'QtGui', 'QtHelp', 'QtMultimedia', 'QtNetwork', 'QtOpenGL',
'QtScript', 'QtScriptTools', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit',
'QtXml', 'QtXmlPatterns', 'Qwt5', '__builtins__', '__doc__',
'__file__', '__name__', '__package__', '__path__', 'phonon']
Reply all
Reply to author
Forward
0 new messages