def check_executable(tool_name):
    """Raises an warning if the executable *tool_name* is not found."""
    result = subprocess.call(['which', tool_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    if result != 0:
        message = "The executable '%s' cannot be found in your $PATH" % tool_name
        raise Exception(message)
def check_executable ( tool_name ) : result = subprocess . call ( [ 'which' , tool_name ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) if result != 0 : message = "The executable '%s' cannot be found in your $PATH" % tool_name raise Exception ( message )
Raises an warning if the executable *tool_name* is not found.