def run_command(cmd, *args):
    if not cmd:
        return ''
    if args:
        cmd = ' '.join((cmd,) + args)
    try:
        import subprocess
    except ImportError:
        # Python 2.3
        sf, rf, ef = os.popen3(cmd)
        sf.close()
        errors = ef.read()
        stdout_data = rf.read()
    else:
        # Python 2.4+
        p = subprocess.Popen(cmd, shell=True,
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout_data, errors = p.communicate()
    global _ERROR_PRINTED
    if errors and not _ERROR_PRINTED:
        _ERROR_PRINTED = True
        print(errors % "ERROR: %s")
        print("** make sure the development packages of libxml2 and libxslt are installed **\n")
    return decode_input(stdout_data).strip()
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/lxml-3.3.6/setupinfo.py/run_command/swapped operands of `%`