Author: bugman Date: Wed Feb 8 15:13:04 2012 New Revision: 15322 URL: http://svn.gna.org/viewcvs/relax?rev=15322&view=rev Log: The relax data store __repr__() method now prints out all objects within the base object. Modified: 1.3/data/__init__.py Modified: 1.3/data/__init__.py URL: http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=15322&r1=15321&r2=15322&view=diff ============================================================================== --- 1.3/data/__init__.py (original) +++ 1.3/data/__init__.py Wed Feb 8 15:13:04 2012 @@ -126,6 +126,28 @@ # The text. text = text + " %s %s: %s\n" % (name, type(obj), split(obj.__doc__, '\n')[0]) + + # All other objects. + text = text + "\n" + text = text + "All other objects:\n" + for name in dir(self): + # Skip special methods. + if search("^_", name): + continue + + # Skip overwritten methods. + if name in list(self.__class__.__dict__.keys()): + continue + + # Skip dictionary methods. + if name in dir(dict): + continue + + # The object. + obj = getattr(self, name) + + # The text. + text = text + " %s %s: %s\n" % (name, type(obj), obj) # Return the text. return text