get_objects_in_namespace function

(Shortest import: from brian2.core.magic import get_objects_in_namespace)


Get all the objects in the current namespace that derive from BrianObject. Used to determine the objects for the MagicNetwork.


level : int, optional

How far to go back to get the locals/globals. Each function/method call should add 1 to this argument, functions/method with a decorator have to add 2.


objects : set

A set with weak references to the BrianObjects in the namespace.