R/RcppExports.R

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

.python.init <- function(name = "") {
    invisible(.Call('PyR_py_init', PACKAGE = 'PyR', name))
}

.python.close <- function() {
    invisible(.Call('PyR_py_close', PACKAGE = 'PyR'))
}

#' Execute Python code and return results as a std::string.
#'
#' @param py_code std::string containing Python code.
#' @param start Execution mode.
#'   c("eval","file","single")
.python.exec <- function(py_code, start = "single") {
    .Call('PyR_py_exec', PACKAGE = 'PyR', py_code, start)
}

#' Get value of Python variable.
#'
#' @param var_name Variable name string.
#' @return Value of the variable.
#' @examples
#' python.get('a')
.python.get <- function(module_name, var_name) {
    .Call('PyR_py_get', PACKAGE = 'PyR', module_name, var_name)
}
nonsleepr/PyR documentation built on May 23, 2019, 9:32 p.m.