def seconds_to_str_fromatter(_format):
<EOL>if _format == "<STR_LIT>":<EOL><INDENT>def _fromatter(seconds):<EOL><INDENT>return "<STR_LIT>".format(seconds)<EOL><DEDENT><DEDENT>elif _format == "<STR_LIT>":<EOL><INDENT>def _fromatter(seconds):<EOL><INDENT>return "<STR_LIT>".format(int(seconds * <NUM_LIT:1000>))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>_format = _format.replace("<STR_LIT>", "<STR_LIT>")<EOL>_format = _format.replace("<STR_LIT>", "<STR_LIT>")<EOL>_format = _format.replace("<STR_LIT:%s>", "<STR_LIT>")<EOL>_format = _format.replace("<STR_LIT>", "<STR_LIT>")<EOL>try:<EOL><INDENT>i = _format.index("<STR_LIT:%>")<EOL>raise TimeFormatError("<STR_LIT>".format(_format[i:i+<NUM_LIT:2>]))<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>def _fromatter(seconds):<EOL><INDENT>millis = int(seconds * <NUM_LIT:1000>)<EOL>hrs, millis = divmod(millis, <NUM_LIT>)<EOL>mins, millis = divmod(millis, <NUM_LIT>)<EOL>secs, millis = divmod(millis, <NUM_LIT:1000>)<EOL>return _format.format(hrs=hrs, mins=mins, secs=secs, millis=millis)<EOL><DEDENT><DEDENT>return _fromatter<EOL>
Accepted format directives: %i %s %m %h