'Ipython Console constructor.'

def __init__(self, parent, testing=False):

    SpyderPluginWidget.__init__(self, parent)
    self.tabwidget = None
    self.menu_actions = None
    self.help = None
    self.historylog = None
    self.variableexplorer = None
    self.editor = None
    self.projects = None
    self.master_clients = 0
    self.clients = []
    self.filenames = []
    self.mainwindow_close = False
    self.create_new_client_if_empty = True
    self.testing = testing
    if (not self.testing):
        self.initialize_plugin()
    if self.testing:
        if (not osp.isdir(programs.TEMPDIR)):
            os.mkdir(programs.TEMPDIR)
    layout = QVBoxLayout()
    self.tabwidget = Tabs(self, self.menu_actions, rename_tabs=True, split_char='/', split_index=0)
    if (hasattr(self.tabwidget, 'setDocumentMode') and (not (sys.platform == 'darwin'))):
        self.tabwidget.setDocumentMode(True)
    self.tabwidget.currentChanged.connect(self.refresh_plugin)
    self.tabwidget.move_data.connect(self.move_tab)
    self.tabwidget.tabBar().sig_change_name.connect(self.rename_tabs_after_change)
    self.tabwidget.set_close_function(self.close_client)
    if (sys.platform == 'darwin'):
        tab_container = QWidget()
        tab_container.setObjectName('tab-container')
        tab_layout = QHBoxLayout(tab_container)
        tab_layout.setContentsMargins(0, 0, 0, 0)
        tab_layout.addWidget(self.tabwidget)
        layout.addWidget(tab_container)
    else:
        layout.addWidget(self.tabwidget)
    self.find_widget = FindReplace(self)
    self.find_widget.hide()
    if (not self.testing):
        self.register_widget_shortcuts(self.find_widget)
    layout.addWidget(self.find_widget)
    self.setLayout(layout)
    self.setAcceptDrops(True)
