bundles / IPython latest / IPython / lib / display / FileLinks / __init__
function
IPython.lib.display:FileLinks.__init__
source: /IPython/lib/display.py:457
Signature
def __init__(self, path, url_prefix = '', included_suffixes = None, result_html_prefix = '', result_html_suffix = <br>, notebook_display_formatter = None, terminal_display_formatter = None, recursive = True)Summary
See FileLink for the path, url_prefix, result_html_prefix and result_html_suffix parameters.
Extended Summary
included_suffixes
Filename suffixes to include when formatting output [default: include all files]
notebook_display_formatter
Used to format links for display in the notebook. See discussion of formatter functions below.
terminal_display_formatter
Used to format links for display in the terminal. See discussion of formatter functions below.
Formatter functions must be of the form
f(dirname, fnames, included_suffixes)dirname
The name of a directory
fnames
The files in that directory
included_suffixes
The file suffixes that should be included in the output (passing None meansto include all suffixes in the output in the built-in formatters)
recursive
Whether to recurse into subdirectories. Default is True.
The function should return a list of lines that will be printed in the notebook (if passing notebook_display_formatter) or the terminal (if passing terminal_display_formatter). This function is iterated over for each directory in self.path. Default formatters are in place, can be passed here to support alternative formatting.
Aliases
IPython.display.FileLinks.__init__