def min_sec(sec,second_digits=1,left_pad=2):
    """ takes float value, represents as minutes, seconds e.g. 62.33242 -> '1m2.3s'
        secondDigits refers to the digits after the decimal point to print,
        left_pad to the left padding on the seconds (for things to line up). Examples:

        min_sec(1.3)     == '0m01.3s'
        min_sec(13)      == '0m13.0s'

        min_sec(5.3,0)   == '0m05s'
        min_sec(5.3,0,0) == '0m5s'
    """
    format_string = "%%dm%%0%d.%dfs"%(left_pad,second_digits)
    return format_string%(sec/60.,sec%60.)