This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: html.utils

Notebook related utilities


  • Brian Granger

7 Functions


Join components of url into a relative url

Use to prevent double slash when joining subpath. This will leave the initial and final / in place


Convert a local file path to a URL


Convert a URL to a local file path


Escape special characters in a URL path

Turns ‘/foo bar/’ into ‘/foo%20bar/’


Unescape special characters in a URL path

Turns ‘/foo%20bar/’ into ‘/foo bar/’

IPython.html.utils.is_hidden(abs_path, abs_root='')

Is a file hidden or contained in a hidden directory?

This will start with the rightmost path element and work backwards to the given root to see if a path is hidden or in a hidden directory. Hidden is determined by either name starting with ‘.’ or the UF_HIDDEN flag as reported by stat.


abs_path : unicode

The absolute path to check for hidden directories.

abs_root : unicode

The absolute path of the root directory in which hidden directories should be checked for.

IPython.html.utils.to_os_path(path, root='')

Convert an API path to a filesystem path

If given, root will be prepended to the path. root must be a filesystem path already.