##// END OF EJS Templates
Merge pull request #1529 from drtimcouper/master...
Merge pull request #1529 from drtimcouper/master Implement new configurable flag to control tab completion on modules that implement the __all__ attribute: IPCompleter.limit_to__all__= Boolean. Instruct the completer to use __all__ for the completion Specifically, when completing on ``object.<tab>``. When True: only those names in obj.__all__ will be included. When False [default]: the __all__ attribute is ignored.

File last commit:

r3880:e7df0ac1
r6486:47367a06 merge
Show More
display.py
27 lines | 668 B | text/x-python | PythonLexer
"""Code that shows off the IPython display logic.
"""
from IPython.lib.latextools import latex_to_png
from IPython.core.display import (
display, display_pretty, display_html,
display_svg, display_json, display_png
)
class Circle(object):
def __init__(self, radius):
self.radius = radius
def _repr_pretty_(self, p, cycle):
p.text(u"\u25CB")
def _repr_html_(self):
return "<h1>Cirle: radius=%s</h1>" % self.radius
def _repr_svg_(self):
return """<svg>
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
</svg>"""
def _repr_png_(self):
return latex_to_png('$\circle$')