Make sure _displayhook is initialized in Py4jZeppelinContext

This commit is contained in:
Alex Goodman 2016-11-13 10:10:50 -08:00
parent c1254f7b0d
commit 2e4ee2dd41
2 changed files with 2 additions and 1 deletions

View file

@ -119,6 +119,7 @@ class PyZeppelinContext(object):
def __init__(self):
self.max_result = 1000
self._displayhook = lambda *args: None
self._setup_matplotlib()
def input(self, name, defaultValue=""):
print(self.errorMsg)
@ -231,4 +232,3 @@ class PyZeppelinContext(object):
z = PyZeppelinContext()
z._setup_matplotlib()

View file

@ -26,6 +26,7 @@ class Py4jZeppelinContext(PyZeppelinContext):
"""A context impl that uses Py4j to communicate to JVM
"""
def __init__(self, z):
PyZeppelinContext.__init__(self)
self.z = z
self.paramOption = gateway.jvm.org.apache.zeppelin.display.Input.ParamOption
self.javaList = gateway.jvm.java.util.ArrayList