% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/python.R
\name{py_run}
\alias{py_run}
\alias{py_run_string}
\alias{py_run_file}
\alias{py_eval}
\title{Run Python code}
\usage{
py_run_string(code, local = FALSE, convert = TRUE)

py_run_file(file, local = FALSE, convert = TRUE)

py_eval(code, convert = TRUE)
}
\arguments{
\item{code}{Code to execute}

\item{local}{Whether to create objects in a local/private namespace (if
\code{FALSE}, objects are created within the main module).}

\item{convert}{Boolean; should Python objects be automatically converted
to their \R equivalent? If set to \code{FALSE}, you can still manually convert
Python objects to \R via the \code{\link[=py_to_r]{py_to_r()}} function.}

\item{file}{Source file}
}
\value{
For \code{py_eval()}, the result of evaluating the expression; For
\code{py_run_string()} and \code{py_run_file()}, the dictionary associated with
the code execution.
}
\description{
Execute code within the the \code{__main__} Python module.
}
