Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3753e48b1a
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (29 sloc) 0.917 kb
from datetime import datetime
from threading import RLock
import sys
import traceback
quiet = False
verbose = False
server = ''
lock = RLock()
TIME_FORMAT = '%d/%m/%Y %H:%M:%S'
def say(format, args=(), say_quiet=False):
if quiet and not say_quiet: return
with lock:
p = format % args
if verbose:
print '%s%s,' % (server,, p
sys.stdout.write('\r%s\r%s%s' % (' '*80, server, p))
def say_line(format, args=()):
if not verbose:
format = '%s, %s\n' % (, format)
say(format, args)
def say_exception(message=''):
type, value, tb = sys.exc_info()
say_line(message + ' %s', str(value))
if verbose:
traceback.print_exception(type, value, tb)
def say_quiet(format, args=()):
say(format, args, True)
Jump to Line
Something went wrong with that request. Please try again.