bundles / IPython 9.17.0 / IPython / lib / display / Code
class
IPython.lib.display:Code
Signature
class Code(data = None, url = None, filename = None, language = None)Members
Summary
Display syntax-highlighted source code.
Extended Summary
This uses Pygments to highlight the code for HTML and Latex output.
Parameters
data: strThe code as a string
url: strA URL to fetch the code from
filename: strA local filename to load the code from
language: strThe short name of a Pygments lexer to use for highlighting. If not specified, it will guess the lexer based on the filename or the code. Available lexers: http://pygments.org/docs/lexers/
Aliases
IPython.display.Code