If you have the code handy, we could try and figure out exactly what it is
and maybe that way figure out how to use it properly.

​In addition to the dir() and type() I mentioned above, there is a member
variable on *uninstantiated* objects in Python that will show you what it
consists of called __mro__.

>>> print MySpecialClass.__mro__
(<class '__main__.MySpecialClass'>, <type 'unicode'>, <type
'basestring'>, <type 'object'>)

For example, here we can see that MySpecialClass is actually a subclass of
unicode which is another subclass of basestring. MySpecialClass might then
look something like this.

class MySpecialClass(unicode):
    def my_method(self):
        print "Hello, World"

Remember, the member doesn’t exist on the instantiated version of this
class.

>>> my_special_instance = MySpecialClass()>>> print my_special_instance.__mro__
AttributeError: 'MySpecialClass' object has no attribute '__mro__'

But if the instantiated version is all you have, then you can first get the
class using type()

>>> print type(my_special_instance).__mro__
(<class '__main__.MySpecialClass'>, <type 'unicode'>, <type
'basestring'>, <type 'object'>)

So, for the object that you are working with, if you could post here the
result of the .__mro__ member variable, we might be able to figure out
whether it’s coming from cmds.window or PySide or something else.
​

-- 
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/CAFRtmODcDYRRfnSqeQR32fQRW4GMB%3DUohyEMMsjtVzzpj6d7dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to