spyder.api.shellconnect.mixins#
Mixins for plugins/widgets that are connected to the IPython console.
Classes
Mixin to connect any widget or object to the shell widgets in the IPython console. |
|
Mixin to connect a plugin composed of stacked widgets to the shell widgets in the IPython console. |
|
Mixin for widgets that will be added to the stacked widget part of ShellConnectMainWidget. |
- class spyder.api.shellconnect.mixins.ShellConnectMixin[source]#
Bases:
objectMixin to connect any widget or object to the shell widgets in the IPython console.
- class spyder.api.shellconnect.mixins.ShellConnectWidgetForStackMixin[source]#
Bases:
objectMixin for widgets that will be added to the stacked widget part of ShellConnectMainWidget.
- class spyder.api.shellconnect.mixins.ShellConnectPluginMixin[source]#
Bases:
ShellConnectMixinMixin to connect a plugin composed of stacked widgets to the shell widgets in the IPython console.
It is assumed that self.get_widget() returns an instance of ShellConnectMainWidget.
- set_shellwidget(shellwidget)[source]#
Update the current shellwidget.
- Parameters:
shellwidget (spyder.plugins.ipyconsole.widgets.shell.ShellWidget) – The shell widget.
- add_shellwidget(shellwidget)[source]#
Add a new shellwidget to be registered.
This function registers a new widget to display content that comes from shellwidget.
- Parameters:
shellwidget (spyder.plugins.ipyconsole.widgets.shell.ShellWidget) – The shell widget.
- remove_shellwidget(shellwidget)[source]#
Remove a registered shellwidget.
- Parameters:
shellwidget (spyder.plugins.ipyconsole.widgets.shell.ShellWidget) – The shell widget.
- add_errored_shellwidget(shellwidget)[source]#
Add a new shellwidget whose kernel failed to start.
- Parameters:
shellwidget (spyder.plugins.ipyconsole.widgets.shell.ShellWidget) – The shell widget.
- current_widget()[source]#
Return the current widget displayed at the moment.
- Returns:
current_widget – The widget displayed in the current tab.
- Return type:
QWidget
- get_widget_for_shellwidget(shellwidget)[source]#
Return the widget registered with the given shellwidget.
- Parameters:
shellwidget (spyder.plugins.ipyconsole.widgets.shell.ShellWidget) – The shell widget.
- Returns:
current_widget – The widget corresponding to the shellwidget, or None if not found.
- Return type:
QWidget