<< py Scithon pyAdd >>

Scithon >> Scithon > py2sci

py2sci

Converts python variable into scilab variable.

Syntax

py2sci(PyVar arg)

Arguments

arg

Python variable to be converted to scilab variable.

Description

Converts a python variable to its Scilab equivalent if possible and returns it. Python numbers and floats are converted to double. Python lists, sets, tuples and other sequence objects are converted to scilab lists. Python dictionaries are converted to a list containing two lists, former containing the keys and the latter containing the values.

Example

startPy
py("a = 5")
var = pyGet("a")
sci_var = py2sci(var)
quitPy

Report an issue
<< py Scithon pyAdd >>