Execute code within the the __main__ Python module.
py_run_string(code, local = FALSE, convert = TRUE)py_run_file(file, local = FALSE, convert = TRUE)
py_eval(code, convert = TRUE)
Code to execute
Whether to create objects in a local/private namespace (if
FALSE, objects are created within the main module).
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.
Source file
For py_eval(), the result of evaluating the expression; For
py_run_string() and py_run_file(), the dictionary associated with
the code execution.