def _run(*args, **kwargs):
    """
    Run current executable via subprocess and given args
    """
    verbose = kwargs.pop("verbose", False)
    if verbose:
        click.secho(" ".join([repr(i) for i in args]), bg='blue', fg='white')

    executable = args[0]
    if not os.path.isfile(executable):
        raise RuntimeError("First argument %r is not a existing file!" % executable)
    if not os.access(executable, os.X_OK):
        raise RuntimeError("First argument %r exist, but is not executeable!" % executable)

    return subprocess.Popen(args, **kwargs)
def _run ( * args , ** kwargs ) : verbose = kwargs . pop ( "verbose" , False ) if verbose : click . secho ( " " . join ( [ repr ( i ) for i in args ] ) , bg = 'blue' , fg = 'white' ) executable = args [ 0 ] if not os . path . isfile ( executable ) : raise RuntimeError ( "First argument %r is not a existing file!" % executable ) if not os . access ( executable , os . X_OK ) : raise RuntimeError ( "First argument %r exist, but is not executeable!" % executable ) return subprocess . Popen ( args , ** kwargs )
Run current executable via subprocess and given args