The function pyGet0 gets Python objects by name.
Primitive data types like bool, int, long, float, str, bytes and unicode are returned as R objects. Python tuples, lists, dictionaries and other Python objects are returned as virtual Python objects.
Note
pyGet0 never creates a new Python object.
pyGet0(key)
key | a string specifying the name of a Python object. |
if ( pyIsConnected() ){
pyExec("import os")
os <- pyGet0("os")
os$getcwd()
os$sep
os$sep <- "Hello Python!"
pyExecp("os.sep")
}