bibliopixel.util.duration module

Convert a string duration to a number of seconds.

bibliopixel.util.duration.PART_MATCH()

Matches against all of the string

bibliopixel.util.duration.parse(s)[source]

Parse a string representing a time interval or duration into seconds, or raise an exception

Parameters:s (str) – a string representation of a time interval
Raises:ValueError – if s can’t be interpreted as a duration