##// END OF EJS Templates
Addressing review comments....
Brian Granger -
Show More
@@ -41,8 +41,9 b' def display(obj, include=None, exclude=None):'
41 41 except for those included in this argument.
42 42 """
43 43 from IPython.core.interactiveshell import InteractiveShell
44 format = InteractiveShell.instance().display_formatter.format
45 publish = InteractiveShell.instance().display_pub.publish
44 inst = InteractiveShell.instance()
45 format = inst.display_formatter.format
46 publish = inst.display_pub.publish
46 47
47 48 format_dict = format(obj, include=include, exclude=exclude)
48 49 publish('IPython.core.display.display', format_dict)
@@ -195,13 +195,13 b' class DisplayHook(Configurable):'
195 195 type. It is up to frontends to determine pick a MIME to to use and
196 196 display that data in an appropriate manner.
197 197
198 This method only compute the format data for the object and should NOT
199 actually print or write that to a stream.
198 This method only computes the format data for the object and should
199 NOT actually print or write that to a stream.
200 200
201 201 Parameters
202 202 ----------
203 203 result : object
204 The Python object passed to the display hook, whose forat will be
204 The Python object passed to the display hook, whose format will be
205 205 computed.
206 206
207 207 Returns
@@ -27,6 +27,8 b' Authors:'
27 27 # Imports
28 28 #-----------------------------------------------------------------------------
29 29
30 from __future__ import print_function
31
30 32 from IPython.config.configurable import Configurable
31 33
32 34 #-----------------------------------------------------------------------------
@@ -98,7 +100,7 b' class DisplayPublisher(Configurable):'
98 100 from IPython.utils import io
99 101 # The default is to simply write the plain text data using io.Term.
100 102 if data.has_key('text/plain'):
101 print >>io.Term.cout, data['text/plain']
103 print(data['text/plain'], file=io.Term.cout)
102 104
103 105
104 106 def publish_display_data(self, source, data, metadata=None):
General Comments 0
You need to be logged in to leave comments. Login now