11 lines
226 B
Python
11 lines
226 B
Python
#!/usr/bin/env python2
|
|
|
|
import time, sys
|
|
|
|
def timestamp():
|
|
"""Return formatted timestamp."""
|
|
return time.strftime('%H:%M:%S', time.gmtime())
|
|
|
|
def _log(strng, level='info'):
|
|
print '\r%s/%s\t%s' % (timestamp(), level, strng)
|