NetLogo 7.0.0-beta2:

py:set

py:set variable-name value

Sets a variable in the Python session with the given name to the given NetLogo value. NetLogo objects will be converted to Python objects as expected.

All vanilla NetLogo objects are supported, but objects from other extensions, even other bundled extensions, are not supported.

Agents are converted into dictionaries with elements for each agent variable. Agentsets are converted into lists of agent dictionaries.

Agents with variables containing references to agentsets will have those variables converted into the string representation of that agentset.

Take me to the full Python Extension Dictionary