def timetag_str(dt=None, sep='<STR_LIT:->', filler='<STR_LIT:0>', resolution=<NUM_LIT:6>):
resolution = int(resolution or <NUM_LIT:6>)<EOL>if sep in (None, False):<EOL><INDENT>sep = '<STR_LIT>'<EOL><DEDENT>sep = str(sep)<EOL>dt = datetime.datetime.now() if dt is None else dt<EOL>return sep.join(('<STR_LIT>' + filler + ('<STR_LIT:2>' if filler else '<STR_LIT>') + '<STR_LIT>').format(i)<EOL>for i in tuple(dt.timetuple()[:resolution]))<EOL>
Generate a date-time tag suitable for appending to a file name.

    >>> timetag_str(resolution=3) == '-'.join('{0:02d}'.format(i) for i in
    ...             tuple(datetime.datetime.now().timetuple()[:3]))
    True
    >>> timetag_str(datetime.datetime(2004,12,8,1,2,3,400000))
    '2004-12-08-01-02-03'
    >>> timetag_str(datetime.datetime(2004,12,8))
    '2004-12-08-00-00-00'
    >>> timetag_str(datetime.datetime(2003,6,19), filler='')
    '2003-6-19-0-0-0'