Table Of Contents

Previous topic

pyDir

Next topic

pyExecg

This Page

pyExecfile

The function pyExecfile calls the Python function code{execfile}. which is the Python equivalent to the function code{source} provided in R.

The function execfile is kind of the source of Python. Since it got omitted in Python 3 a replacement gets assigned following the suggestions from cr http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html.

Usage

pyExecfile(filename)

Arguments

filename   a character string giving the name or full path of the file to be executed.

Examples

\dontrun{
pyExecfile("myPythonScript.py")
}