def import_pyqt4(version=2):
 import sip
 if (version is not None):
  sip.setapi('QString', version)
  sip.setapi('QVariant', version)
 from PyQt4 import QtGui, QtCore, QtSvg
 if (not check_version(QtCore.PYQT_VERSION_STR, '4.7')):
  raise ImportError(('IPython requires PyQt4 >= 4.7, found %s' % QtCore.PYQT_VERSION_STR))
 QtCore.Signal = QtCore.pyqtSignal
 QtCore.Slot = QtCore.pyqtSlot
 version = sip.getapi('QString')
 api = (QT_API_PYQTv1 if (version == 1) else QT_API_PYQT)
 return (QtCore, QtGui, QtSvg, api)

def import_pyqt4 ( version = 2 ) : import sip if ( version is not None ) : sip . setapi ( 'QString' , version ) sip . setapi ( 'QVariant' , version ) from PyQt4 import QtGui , QtCore , QtSvg if ( not check_version ( QtCore . PYQT_VERSION_STR , '4.7' ) ) : raise ImportError ( ( 'IPython requires PyQt4 >= 4.7, found %s' % QtCore . PYQT_VERSION_STR ) ) QtCore . Signal = QtCore . pyqtSignal QtCore . Slot = QtCore . pyqtSlot version = sip . getapi ( 'QString' ) api = ( QT_API_PYQTv1 if ( version == 1 ) else QT_API_PYQT ) return ( QtCore , QtGui , QtSvg , api )
import pyqt4 parameters version : 1 .