Source code for sas.qtgui.Utilities.ObjectLibrary
import sys
this = sys.modules[__name__]
this._objects = {}
[docs]def addObject(obj_name, obj):
this._objects[obj_name] = obj
[docs]def deleteObjectByRef(obj):
for name, object in this._objects.items():
if object == obj:
del this._objects[name]
break
[docs]def deleteObjectByName(obj_name):
if obj_name in this._objects:
del this._objects[obj_name]
[docs]def getObject(obj_name):
return this._objects[obj_name] if obj_name in this._objects else None
[docs]def listObjects():
return list(this._objects.keys())