##// END OF EJS Templates
Allow output prompt to leave out numbers for qtconsole
Carlos Cordoba -
Show More
@@ -483,7 +483,8 b' class IPythonWidget(FrontendWidget):'
483 body = self.in_prompt % number
483 body = self.in_prompt % number
484 except TypeError:
484 except TypeError:
485 # allow in_prompt to leave out number, e.g. '>>> '
485 # allow in_prompt to leave out number, e.g. '>>> '
486 body = self.in_prompt
486 from xml.sax.saxutils import escape
487 body = escape(self.in_prompt)
487 return '<span class="in-prompt">%s</span>' % body
488 return '<span class="in-prompt">%s</span>' % body
488
489
489 def _make_continuation_prompt(self, prompt):
490 def _make_continuation_prompt(self, prompt):
@@ -498,7 +499,12 b' class IPythonWidget(FrontendWidget):'
498 def _make_out_prompt(self, number):
499 def _make_out_prompt(self, number):
499 """ Given a prompt number, returns an HTML Out prompt.
500 """ Given a prompt number, returns an HTML Out prompt.
500 """
501 """
501 body = self.out_prompt % number
502 try:
503 body = self.out_prompt % number
504 except TypeError:
505 # allow out_prompt to leave out number, e.g. '<<< '
506 from xml.sax.saxutils import escape
507 body = escape(self.out_prompt)
502 return '<span class="out-prompt">%s</span>' % body
508 return '<span class="out-prompt">%s</span>' % body
503
509
504 #------ Payload handlers --------------------------------------------------
510 #------ Payload handlers --------------------------------------------------
General Comments 0
You need to be logged in to leave comments. Login now