Table Of Contents

Previous topic

autodetectPython

Next topic

pyAttach

This Page

BEGIN.Python

The function BEGIN.Python starts an Python read-eval-print loop.

BEGIN.Python emulates the behavior of the Python terminal and therefore allows interactive Python code development from within R.

Usage

BEGIN.Python()

Arguments

Examples

\dontrun{
code <-
BEGIN.Python()
import os
os.getcwd()
dir(os)
x = 3**3
END.Python
## NOTE: BEGIN.Python returns the successfully executed code as character.
cat(code)
pyGet0("x")
}