Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def execute(command):
    try:
        response = subprocess.call(command, shell=True)
        if response == 0:
            return True
        else:
            return False
    except subprocess.CalledProcessError as cpe:
        try:
            sys.stderr.write(cpe.output)
        except TypeError as te:
            sys.stderr.write(str(cpe.output))
    except Exception as e:
        if DEBUG_FLAG:
            sys.stderr.write("Naked Framework Error: unable to run the shell command with the execute() function (Naked.toolshed.shell.py).")
        raise e
        


src/n/a/Naked-0.1.30/lib/Naked/commands/build.py   Naked(Download)
def compile_c_code(abs_dirpath):
    from Naked.toolshed.shell import execute
    from os import chdir
 
    chdir(abs_dirpath)
    print('•naked• Compiling the C source library files...')
    success = execute("python setup.py build_ext --inplace")