##// END OF EJS Templates
Docstring for Code class
Thomas Kluyver -
Show More
@@ -558,6 +558,23 b' class FileLinks(FileLink):'
558
558
559
559
560 class Code(TextDisplayObject):
560 class Code(TextDisplayObject):
561 """Display syntax-highlighted source code.
562
563 This uses Pygments to highlight the code for HTML and Latex output.
564
565 Parameters
566 ----------
567 data : str
568 The code as a string
569 url : str
570 A URL to fetch the code from
571 filename : str
572 A local filename to load the code from
573 language : str
574 The short name of a Pygments lexer to use for highlighting.
575 If not specified, it will guess the lexer based on the filename
576 or the code. Available lexers: http://pygments.org/docs/lexers/
577 """
561 def __init__(self, data=None, url=None, filename=None, language=None):
578 def __init__(self, data=None, url=None, filename=None, language=None):
562 self.language = language
579 self.language = language
563 super().__init__(data=data, url=url, filename=filename)
580 super().__init__(data=data, url=url, filename=filename)
General Comments 0
You need to be logged in to leave comments. Login now