def base_log(*args): global VERBOSE global logfile out = ' '.join(str(x) for x in args) if out[-1] != '\n': out += '\n' string_write(logfile, out) if VERBOSE: sys.stderr.write(out)