move includes in root directory

This commit is contained in:
mickael
2019-01-05 00:22:28 +00:00
parent df2a2ec072
commit 85043d8e8a
6 changed files with 0 additions and 6 deletions

16
misc.py Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python
import time, random, sys, os, string
import rocksock
""" return formatted timestamp """
def timestamp():
return time.strftime('%H:%M:%S', time.gmtime())
""" return some random string """
def random_string(strlen=20):
return ''.join([random.choice(string.letters) for x in xrange(strlen)])
def _log(strng, level='info'):
print '%s/%s\t%s' % (timestamp(), level, strng)