##// END OF EJS Templates
Merge pull request #3173 from rgbkrk/doc_fix...
Thomas Kluyver -
r10214:4f00f4ab merge
parent child Browse files
Show More
@@ -35,7 +35,7 b' from IPython.utils.py3compat import string_types'
35 35 #-----------------------------------------------------------------------------
36 36
37 37 def _safe_exists(path):
38 """check path, but don't let exceptions raise"""
38 """Check path, but don't let exceptions raise"""
39 39 try:
40 40 return os.path.exists(path)
41 41 except Exception:
@@ -60,7 +60,7 b' def display(*objs, **kwargs):'
60 60 format data dict. If this is set *only* the format types included
61 61 in this list will be computed.
62 62 exclude : list or tuple, optional
63 A list of format type string (MIME types) to exclue in the format
63 A list of format type strings (MIME types) to exclude in the format
64 64 data dict. If this is set all format types will be computed,
65 65 except for those included in this argument.
66 66 """
@@ -199,7 +199,7 b' def display_latex(*objs, **kwargs):'
199 199
200 200 def display_json(*objs, **kwargs):
201 201 """Display the JSON representation of an object.
202
202
203 203 Note that not many frontends support displaying JSON.
204 204
205 205 Parameters
@@ -276,11 +276,11 b' class DisplayObject(object):'
276 276 url = None
277 277 filename = data
278 278 data = None
279
279
280 280 self.data = data
281 281 self.url = url
282 282 self.filename = None if filename is None else unicode(filename)
283
283
284 284 self.reload()
285 285
286 286 def reload(self):
@@ -332,15 +332,15 b' class Latex(DisplayObject):'
332 332
333 333
334 334 class SVG(DisplayObject):
335
335
336 336 # wrap data in a property, which extracts the <svg> tag, discarding
337 337 # document headers
338 338 _data = None
339
339
340 340 @property
341 341 def data(self):
342 342 return self._data
343
343
344 344 @data.setter
345 345 def data(self, svg):
346 346 if svg is None:
@@ -358,7 +358,7 b' class SVG(DisplayObject):'
358 358 # but this is probably an error.
359 359 pass
360 360 self._data = svg
361
361
362 362 def _repr_svg_(self):
363 363 return self.data
364 364
@@ -388,8 +388,8 b' class Javascript(DisplayObject):'
388 388 When this object is returned by an expression or passed to the
389 389 display function, it will result in the data being displayed
390 390 in the frontend. If the data is a URL, the data will first be
391 downloaded and then displayed.
392
391 downloaded and then displayed.
392
393 393 In the Notebook, the containing element will be available as `element`,
394 394 and jQuery will be available. The output area starts hidden, so if
395 395 the js appends content to `element` that should be visible, then
@@ -410,7 +410,7 b' class Javascript(DisplayObject):'
410 410 string.
411 411 css: : list or str
412 412 A sequence of css files to load before running the source code.
413 The full URLs of the css files should be give. A single css URL
413 The full URLs of the css files should be given. A single css URL
414 414 can also be given as a string.
415 415 """
416 416 if isinstance(lib, basestring):
@@ -554,12 +554,12 b' class Image(DisplayObject):'
554 554
555 555 def clear_output(stdout=True, stderr=True, other=True):
556 556 """Clear the output of the current cell receiving output.
557
557
558 558 Optionally, each of stdout/stderr or other non-stream data (e.g. anything
559 559 produced by display()) can be excluded from the clear event.
560
560
561 561 By default, everything is cleared.
562
562
563 563 Parameters
564 564 ----------
565 565 stdout : bool [default: True]
@@ -583,4 +583,4 b' def clear_output(stdout=True, stderr=True, other=True):'
583 583 if stderr:
584 584 print('\033[2K\r', file=io.stderr, end='')
585 585 io.stderr.flush()
586
586
General Comments 0
You need to be logged in to leave comments. Login now