I have a ClassWrapper that wraps around a third party database object.
Each database object has a set of properties, like columns in a
relational database.
I want my wrapper to generate a property for each database object and
load its value into it.
Thus, in my database (which is an oodbms) say I have a MyDbaseClass
with MyProperty1, MyProperty2, etc, after it is loaded, I have:
dbase_object = LoadMyDbaseClas s
PythonDbaseClas s = PythonWrapper(d base_object)
I can then load in a list of ['MyProperty1',' MyProperty2', etc].
But how can I turn these list elements into PythonDbaseClas s
properties, so that I could then simply have:
print PythonDbaseClas s.MyProperty1
PythonDbaseClas s.MyProperty2=" 4"
Is this clear?
Each database object has a set of properties, like columns in a
relational database.
I want my wrapper to generate a property for each database object and
load its value into it.
Thus, in my database (which is an oodbms) say I have a MyDbaseClass
with MyProperty1, MyProperty2, etc, after it is loaded, I have:
dbase_object = LoadMyDbaseClas s
PythonDbaseClas s = PythonWrapper(d base_object)
I can then load in a list of ['MyProperty1',' MyProperty2', etc].
But how can I turn these list elements into PythonDbaseClas s
properties, so that I could then simply have:
print PythonDbaseClas s.MyProperty1
PythonDbaseClas s.MyProperty2=" 4"
Is this clear?
Comment