Skip to content

Commit

Permalink
Merge pull request #5207 from rlaverde/split-console
Browse files Browse the repository at this point in the history
PR: Split Internal Console module
  • Loading branch information
ccordoba12 authored Sep 12, 2017
2 parents b5afc36 + 9c137e8 commit 0dc911c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def get_focus_python_shell():
"""Extract and return Python shell from widget
Return None if *widget* is not a Python shell (e.g. IPython kernel)"""
widget = QApplication.focusWidget()
from spyder.widgets.shell import PythonShellWidget
from spyder.plugins.console.widgets.shell import PythonShellWidget
from spyder.widgets.externalshell.pythonshell import ExternalPythonShell
if isinstance(widget, PythonShellWidget):
return widget
Expand Down Expand Up @@ -794,7 +794,7 @@ def create_edit_action(text, tr_text, icon):

# Internal console plugin
self.debug_print(" ..plugin: internal console")
from spyder.plugins.console import Console
from spyder.plugins.console.plugin import Console
self.console = Console(self, namespace, exitfunc=self.closing,
profile=self.profile,
multithreaded=self.multithreaded,
Expand Down Expand Up @@ -1969,7 +1969,7 @@ def get_focus_widget_properties(self):
Returns tuple (widget, properties) where properties is a tuple of
booleans: (is_console, not_readonly, readwrite_editor)"""
widget = QApplication.focusWidget()
from spyder.widgets.shell import ShellBaseWidget
from spyder.plugins.console.widgets.shell import ShellBaseWidget
from spyder.plugins.editor.widgets.editor import TextEditBaseWidget
from spyder.widgets.ipythonconsole import ControlWidget

Expand Down
12 changes: 12 additions & 0 deletions spyder/plugins/console/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)

"""
spyder.plugins.console
======================
Internal Console Plugin
"""
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from spyder.utils.misc import get_error_match, remove_backslashes
from spyder.utils.qthelpers import (add_actions, create_action,
DialogManager, mimedata2url)
from spyder.widgets.internalshell import InternalShell
from spyder.plugins.console.widgets.internalshell import InternalShell
from spyder.widgets.findreplace import FindReplace
from spyder.plugins.variableexplorer.widgets.viewers.collections import (
CollectionsEditor)
Expand Down
10 changes: 10 additions & 0 deletions spyder/plugins/console/widgets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)

"""
spyder.plugins.console.widgets
==============================
"""
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

# Local imports
from spyder import get_versions
from spyder.interpreter import Interpreter
from spyder.plugins.console.interpreter import Interpreter
from spyder.py3compat import (builtins, getcwd, to_binary_string,
to_text_string)
from spyder.utils import icon_manager as ima
from spyder.utils import programs
from spyder.utils.dochelpers import getargtxt, getdoc, getobjdir, getsource
from spyder.utils.misc import get_error_match
from spyder.utils.qthelpers import create_action
from spyder.widgets.shell import PythonShellWidget
from spyder.plugins.console.widgets.shell import PythonShellWidget
from spyder.plugins.variableexplorer.widgets.viewers.object import oedit
# TODO: remove the CONF object and make it work anyway
# In fact, this 'CONF' object has nothing to do in package spyder/widgets
Expand Down
File renamed without changes.

0 comments on commit 0dc911c

Please sign in to comment.