def SetRenderWindow(self,w):
        if w == self.mRenWin:
            return
        
        if self.mRenWin:
            if self.mRenWin.GetMapped():
                self.mRenWin.Finalize()
                
        self.mRenWin = w
        
        if self.mRenWin:
            self.mRenWin.Register(None)
            if system.systemType=='Linux':
                try:
                    vp = '_%s_void_p' % (hex(int(QtGui.QX11Info.display()))[2:])
                except TypeError:
                    #This was change for PyQt4.2
                    if isinstance(QtGui.QX11Info.display(),QtGui.Display):
                        display = sip.unwrapinstance(QtGui.QX11Info.display())
                        vp = '_%s_void_p' % (hex(display)[2:])
                self.mRenWin.SetDisplayId(vp)
                if not self.mRenWin.GetMapped():
                    self.mRenWin.GetInteractor().Initialize()
                    system.XDestroyWindow(self.mRenWin.GetGenericDisplayId(),
                                          self.mRenWin.GetGenericWindowId())
                    self.mRenWin.Finalize()
                self.mRenWin.SetWindowInfo(str(int(self.winId())))
            else:
                self.mRenWin.SetWindowInfo(str(int(self.winId())))                
            if self.isVisible():
                self.mRenWin.Start()
Connect to a bucket.
dataset/ETHPy150Open VisTrails/VisTrails/contrib/titan/vtkviewcell.py/QVTKViewWidget.SetRenderWindow--crossover with--dataset/ETHPy150Open couchbase/couchbase-python-client/couchbase/bucket.py/Bucket.__init__