Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Split Internal Console module #5207

Merged
merged 7 commits into from
Sep 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.