Macaulay2 » Documentation
Packages » Python » PythonContext » PythonContext _ String
next | previous | forward | backward | up | index | toc

PythonContext _ String -- get value of variable in a python context

Description

This gets the value of a variable in the given PythonContext.

i1 : math = PythonContext "from math import *"

o1 = math

o1 : PythonContext
i2 : math "x = sin(3.4)"
i3 : math_"x"

o3 = -0.2555411020268312

o3 : PythonObject of class float

Ways to use this method:


The source of this document is in Python/doc/context.m2:68:0.