lektor.utils.parse_path ()

  • New in Lektor Version 2.0

This function parses a path into the individual components it's made from. The path is always assumed to be absolute and made absolute if it's not yet so. The root path is the empty list.

Example

>>> from lektor.utils import parse_path
>>> parse_path('/foo/bar')
['foo', 'bar']
>>> parse_path('/')
[]

Comments