Description Usage Arguments Details Value Examples
Executes Python code.
1 | python.load( file, get.exception = TRUE )
|
file |
a file containing python code to be executed |
get.exception |
logical value indicating whether to check or not for exceptions in Python |
This function runs Python code contained in a file.
Typically, this file would contain functions to be called via python.call
or other functions in this package.
The get.exception
option allows the user to disregard Python exceptions in cases where safe calls to avoid the overhead of checking for them.
None.
If the code produces some output, it is up to the caller to go and fetch if from Python using function python.get
.
1 2 3 4 5 6 | a <- 1:4
b <- 5:8
# this file contains the definition of function concat
python.load( system.file( "concat.py", package = "rPython" ) )
python.call( "concat", a, b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.