fixing copypaste mistake
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
from bonobo.util.helpers import jupyter_run
|
|
||||||
from .plugin import JupyterOutputPlugin
|
from .plugin import JupyterOutputPlugin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,21 @@
|
|||||||
from IPython.core.display import display
|
|
||||||
|
|
||||||
from bonobo.core.plugins import Plugin
|
from bonobo.core.plugins import Plugin
|
||||||
from bonobo.ext.jupyter.widget import BonoboWidget
|
from bonobo.ext.jupyter.widget import BonoboWidget
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import selenium
|
import IPython.core.display
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logging.exception(
|
logging.exception(
|
||||||
'You must install selenium to use the bonobo selenium extension. Easiest way is to install the '
|
'You must install Jupyter to use the bonobo Jupyter extension. Easiest way is to install the '
|
||||||
'optional "selenium" dependencies with «pip install bonobo[selenium]», but you can also install a '
|
'optional "jupyter" dependencies with «pip install bonobo[jupyter]», but you can also install a '
|
||||||
'specific version by yourself.')
|
'specific version by yourself.')
|
||||||
|
|
||||||
|
|
||||||
class JupyterOutputPlugin(Plugin):
|
class JupyterOutputPlugin(Plugin):
|
||||||
def initialize(self, context):
|
def initialize(self, context):
|
||||||
self.widget = BonoboWidget()
|
self.widget = BonoboWidget()
|
||||||
display(self.widget)
|
IPython.core.display.display(self.widget)
|
||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
self.widget.value = [repr(component) for component in context.parent.components]
|
self.widget.value = [repr(component) for component in context.parent.components]
|
||||||
|
|||||||
Reference in New Issue
Block a user