diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index d6ebd3fa3f7..a3075afa367 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -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 @@ -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, @@ -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 diff --git a/spyder/plugins/console/__init__.py b/spyder/plugins/console/__init__.py new file mode 100644 index 00000000000..9091a4a8300 --- /dev/null +++ b/spyder/plugins/console/__init__.py @@ -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 +""" diff --git a/spyder/interpreter.py b/spyder/plugins/console/interpreter.py similarity index 100% rename from spyder/interpreter.py rename to spyder/plugins/console/interpreter.py diff --git a/spyder/plugins/console.py b/spyder/plugins/console/plugin.py similarity index 97% rename from spyder/plugins/console.py rename to spyder/plugins/console/plugin.py index 7e4b8952b4d..a5cad1e149f 100644 --- a/spyder/plugins/console.py +++ b/spyder/plugins/console/plugin.py @@ -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) diff --git a/spyder/plugins/console/widgets/__init__.py b/spyder/plugins/console/widgets/__init__.py new file mode 100644 index 00000000000..97000e1ad2c --- /dev/null +++ b/spyder/plugins/console/widgets/__init__.py @@ -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 +============================== +""" diff --git a/spyder/widgets/internalshell.py b/spyder/plugins/console/widgets/internalshell.py similarity index 96% rename from spyder/widgets/internalshell.py rename to spyder/plugins/console/widgets/internalshell.py index 7b962bce208..c35ded59e67 100644 --- a/spyder/widgets/internalshell.py +++ b/spyder/plugins/console/widgets/internalshell.py @@ -24,7 +24,7 @@ # 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 @@ -32,7 +32,7 @@ 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 diff --git a/spyder/widgets/shell.py b/spyder/plugins/console/widgets/shell.py similarity index 100% rename from spyder/widgets/shell.py rename to spyder/plugins/console/widgets/shell.py