Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class display(object):
- """Display HTML representation of multiple objects"""
- template = """<div style="float: left; padding: 10px;">
- <b><p style='font-family:"Courier New", Courier, monospace; font-size: 30px;text-align: center;color:red'>{0}</b></p>{1}
- </div>"""
- def __init__(self, *args):
- self.args = args
- def _repr_html_(self):
- return '\n'.join(self.template.format(a, eval(a)._repr_html_())
- for a in self.args)
- def __repr__(self):
- return '\n\n'.join(a + '\n' + repr(eval(a))
- for a in self.args)
Add Comment
Please, Sign In to add comment