Determines whether or not it can find a suitable python cmd
Source:R/find_python_cmd.r
can_find_python_cmd.Rdcan_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
)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 leftNULLwon'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 fromfind_python_cmd()should be suppressed
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.
Examples
did_find_cmd <- can_find_python_cmd()
python_cmd <- attr(did_find_cmd, "python_cmd")