def dump_chronology(path, doses):
    if (doses is None):
        doses = []
    with open(path, 'w') as wfile:
        for (p, s, e) in doses:
            if (not isinstance(s, str)):
                s = s.strftime(ISO_FORMAT_STR)
            if (not isinstance(s, str)):
                s = s.strftime(ISO_FORMAT_STR)
            if (not isinstance(p, str)):
                p = '{:0.3f}'.format(p)
            line = '{},{},{}\n'.format(p, s, e)
            wfile.write(line)
def dump_chronology(path, doses):
    if (doses is None):
        doses = []
    with open(path, 'w') as wfile:
        for (p, s, e) in doses:
            if (not isinstance(s, str)):
                s = s.strftime(ISO_FORMAT_STR)
            if (not isinstance(s, str)):
                s = s.strftime(ISO_FORMAT_STR)
            if (not isinstance(p, str)):
                p = '{:0.3f}'.format(p)
            line = '{},{},{}\n'.format(p, s, e)
            wfile.write(line)