def timecode(seconds, seperator='.'):
    """Takes seconds and returns SRT timecode format: e.g. 00:02:36,894"""
    seconds = float(seconds)
    timecode_fmt = (
        '%(hour)02d:%(minute)02d:%(second)02d%(ms_seperator)s%(ms)03d')
    return timecode_fmt % {'hour': seconds // 3600, 'minute': seconds // 60 %
        60, 'second': seconds % 60, 'ms': seconds % 1 * 1000,
        'ms_seperator': seperator}
