py.get: Get/set objects from a module

Usage Arguments Author(s) Examples

Usage

1
2
py.get(name, module = NULL, quiet = FALSE, .ref = FALSE)
py.set(name, value, module = NULL, quiet = FALSE)

Arguments

name

object name

value

new value

module

module (reference or name) or NULL to use the __main__ module

quiet

return NULL instead of an error if not present

.ref

logical, if TRUE a reference is returned, otherwise a conversion to a native type is attempted

Author(s)

Simon Urbanek

Examples

1
2
3
4
5
py.init()
py.eval("a=10")
py.get("a")
py.set("b",5)
py.get("len","__builtin__")(1:10)

s-u/rpython documentation built on May 28, 2019, 10:48 a.m.