# This only works with PyQt, PySide does not support the QtDesigner module
import os
if not 'QT_API' in os.environ:
    os.environ.setdefault("QT_API", "PyQt")
import pcef.python

PLUGINS_TYPES = {'QPythonCodeEdit': pcef.python.QPythonCodeEdit}

try:
    from pyqode.core.plugins.pcef_core_plugin import QCodeEditPlugin

    class QPythonCodeEditPlugin(QCodeEditPlugin):
        _module = 'pcef.python'        # path to the widget's module
        _class = 'QPythonCodeEdit'    # name of the widget class
        _name = "QPythonCodeEdit"
        _icon = None
        _type = pcef.python.QPythonCodeEdit

        def createWidget(self, parent):
            return pcef.python.QPythonCodeEdit(parent)
except ImportError:
    print("Cannot use pcef plugins without PyQt4")

# This only works with PyQt, PySide does not support the QtDesigner module
import os
if not 'QT_API' in os.environ:
    os.environ.setdefault("QT_API", "PyQt")
import pyqode.python

PLUGINS_TYPES = {'QPythonCodeEdit': pyqode.python.QPythonCodeEdit}

try:
    from pyqode.core.plugins.pcef_core_plugin import QCodeEditPlugin

    class QPythonCodeEditPlugin(QCodeEditPlugin):
        _module = 'pcef.python'        # path to the widget's module
        _class = 'QPythonCodeEdit'    # name of the widget class
        _name = "QPythonCodeEdit"
        _icon = None
        _type = pyqode.python.QPythonCodeEdit

        def createWidget(self, parent):
            return pyqode.python.QPythonCodeEdit(parent)
except ImportError:
    print("Cannot use pcef plugins without PyQt4")

Fix bug with python plugin and pyside
Fix bug with python plugin and pyside

  # This only works with PyQt, PySide does not support the QtDesigner module
  import os
  if not 'QT_API' in os.environ:
      os.environ.setdefault("QT_API", "PyQt")
- import pcef.python
+ import pyqode.python
  
- PLUGINS_TYPES = {'QPythonCodeEdit': pcef.python.QPythonCodeEdit}
+ PLUGINS_TYPES = {'QPythonCodeEdit': pyqode.python.QPythonCodeEdit}
  
  try:
      from pyqode.core.plugins.pcef_core_plugin import QCodeEditPlugin
  
      class QPythonCodeEditPlugin(QCodeEditPlugin):
          _module = 'pcef.python'        # path to the widget's module
          _class = 'QPythonCodeEdit'    # name of the widget class
          _name = "QPythonCodeEdit"
          _icon = None
-         _type = pcef.python.QPythonCodeEdit
+         _type = pyqode.python.QPythonCodeEdit
  
          def createWidget(self, parent):
-             return pcef.python.QPythonCodeEdit(parent)
+             return pyqode.python.QPythonCodeEdit(parent)
  except ImportError:
      print("Cannot use pcef plugins without PyQt4")
  
Fix bug with python plugin and pyside
## Code Before:
# This only works with PyQt, PySide does not support the QtDesigner module
import os
if not 'QT_API' in os.environ:
    os.environ.setdefault("QT_API", "PyQt")
import pcef.python

PLUGINS_TYPES = {'QPythonCodeEdit': pcef.python.QPythonCodeEdit}

try:
    from pyqode.core.plugins.pcef_core_plugin import QCodeEditPlugin

    class QPythonCodeEditPlugin(QCodeEditPlugin):
        _module = 'pcef.python'        # path to the widget's module
        _class = 'QPythonCodeEdit'    # name of the widget class
        _name = "QPythonCodeEdit"
        _icon = None
        _type = pcef.python.QPythonCodeEdit

        def createWidget(self, parent):
            return pcef.python.QPythonCodeEdit(parent)
except ImportError:
    print("Cannot use pcef plugins without PyQt4")

## Instruction:
Fix bug with python plugin and pyside
## Code After:
# This only works with PyQt, PySide does not support the QtDesigner module
import os
if not 'QT_API' in os.environ:
    os.environ.setdefault("QT_API", "PyQt")
import pyqode.python

PLUGINS_TYPES = {'QPythonCodeEdit': pyqode.python.QPythonCodeEdit}

try:
    from pyqode.core.plugins.pcef_core_plugin import QCodeEditPlugin

    class QPythonCodeEditPlugin(QCodeEditPlugin):
        _module = 'pcef.python'        # path to the widget's module
        _class = 'QPythonCodeEdit'    # name of the widget class
        _name = "QPythonCodeEdit"
        _icon = None
        _type = pyqode.python.QPythonCodeEdit

        def createWidget(self, parent):
            return pyqode.python.QPythonCodeEdit(parent)
except ImportError:
    print("Cannot use pcef plugins without PyQt4")
