Learn R Programming

findpython (version 1.0.8)

can_find_python_cmd: Determines whether or not it can find a suitable python cmd

Description

can_find_python_cmd runs find_python_cmd and returns whether it could find a suitable python cmd. If it was successful its output also saves the found command as an attribute.

Usage

can_find_python_cmd(
  minimum_version = NULL,
  maximum_version = NULL,
  required_modules = NULL,
  error_message = NULL,
  silent = FALSE
)

Value

TRUE or FALSE depending on whether

find_python_cmd could find an appropriate python binary. If TRUE the path to an appropriate python binary is also set as an attribute.

Arguments

minimum_version

The minimum version of python it should be. Should be a string with major and minor number separated by a ‘.’. If left NULL won't impose such a restriction.

maximum_version

The maximum version of python it should be. Should be a string with major and minor number separated by a ‘.’. If left NULL won't impose such a restriction.

required_modules

Which modules should be required. Can use a single "|" to represent a single either-or requirement like "json|simplejson". If left NULL won't impose such a restriction.

error_message

What error message the user will see if couldn't find a sufficient python binary. If left NULL will print out a default message.

silent

Passed to try, whether any error messages from find_python_cmd should be suppressed

See Also

find_python_cmd

Examples

Run this code
     did_find_cmd <- can_find_python_cmd()
     python_cmd <- attr(did_find_cmd, "python_cmd")

Run the code above in your browser using DataLab