Hello all,

I am currently trying to append to a config file global list and have the 
need to do so using another variable. My problem is as such:

I am iterating through my objects I am placing in my treeview and and 
checking them against an XML file that has as the tag the string I need to 
check for and as the attributes the name of the list I need to append to. I 
need to be able to access the config."list name" using a variable.

For example rather than using config.modelGraphics.append(object) I would 
be using config."variable_name".append(object)

Is this possible or do I have to use some sort of getter/setter function 
rather than trying to directly access my variable?

My code is listed below.

Cheers,

Ben

        def checkAssetDefinition(self, object, fileType):
                object = str(object)
                for attr in self.xmlAssetDefsList:
                        if object.startswith(attr):
                                innerDict = self.xmlAssetDefsList.get(attr)
                                for myType in innerDict:
                                        if myType == fileType:
                                                configVar = 
innerDict.get(myType)
                                                config.configVar.append(myType) 
???
                                                # Need to get the config 
variable from the config list variable

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/fb7be905-f72b-4552-a148-9ed545693235%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to