R: Read and evaluate a Python script

source_python {reticulate} | R Documentation

## Read and evaluate a Python script

### Description

Evaluate a Python script and make created Python objects available within R. The Python script is sourced within the Python main module, and so any objects defined are made available within Python as well.

### Usage

    source_python(file, envir = parent.frame(), convert = TRUE)

### Arguments

`file` | Source file
`envir` | The environment to assign Python objects into (for example, `parent.frame()` or `globalenv()`). Specify `NULL` to not assign Python objects.
`convert` | `TRUE` to automatically convert Python objects to their R equivalent. If you pass `FALSE` you can do manual conversion using the `py_to_r()` function.

[Package reticulate version 1.6 Index]