pretty: hide printed '^C' when ^C'ing
This commit is contained in:
4
misc.py
4
misc.py
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import time, random, string
|
||||
import time, random, string, sys
|
||||
|
||||
""" return formatted timestamp """
|
||||
def timestamp():
|
||||
@@ -11,5 +11,5 @@ 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)
|
||||
print '\r%s/%s\t%s' % (timestamp(), level, strng)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user