human
Can you provide a Python program to print >>sys given the following:
I wrote the below code

    def _repl(match):
        if (match.group(0) == '%LOG_DIR%'):
            return log_dir
        elif (match.group(0) == '%PROC_NAME%'):
            return proc_name
    log_conf = get_desktop_root('conf', 'log.conf')
    if (not os.path.isfile(log_conf)):
        return None
    try:
        raw = file(log_conf).read()
        sio = StringIO(CONF_RE.sub(_repl, raw))
        return sio
    except IOError as ex:
        print >>sys.stderr, ('ERROR:    Failed    to    open    %s:    %s' % (log_conf, ex))
        return None

What's a good function header?
assistant
#Here is Python program to print >>sys.

def _read_log_conf(proc_name, log_dir):