示例#1
0
 def write_line(self, line):
     displaypub.publish_javascript(
         'document.%s.append($("<div>%s</div>"));' % (
             self.output_id, cgi.escape(line)))
示例#2
0
 def finalize(self):
     displaypub.publish_javascript('delete document.%s;' % self.output_id)
示例#3
0
 def write_chars(self, chars):
     displaypub.publish_javascript(
         'document.%s.append($("<span>%s</span>"));' % (
             self.output_id, cgi.escape(chars)))
示例#4
0
 def __init__(self):
     self.output_id = 'ipython_nose_%s' % uuid.uuid4().hex
     displaypub.publish_html(
         '<div id="%s"></div>' % self.output_id)
     displaypub.publish_javascript(
         'document.%s = $("#%s");' % (self.output_id, self.output_id))