Dec-14-2017, 03:40 PM
time.gmtime()
dos not have milliseconds.The term is seconds since the epoch: January 1, 1970, 00:00:00 (UTC).
>>> time.gmtime(audio.info.length) time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=3, tm_sec=53, tm_wday=3, tm_yday=1, tm_isdst=0) >>> time.strftime('%H:%M:%S', time.gmtime(audio.info.length)) '00:03:53'Don't use
len
as variable name.Name it's used bye Python.
>>> len('hello') 5