Author: bugman
Date: Mon Dec 8 17:49:37 2014
New Revision: 27023
URL: http://svn.gna.org/viewcvs/relax?rev=27023&view=rev
Log:
Fixes and improvements for the data_store.nmrglue.Nmrglue object __repr__()
method.
The Element class objects are now skipped, avoiding recursive __repr__()
problems. And the string
returned is now better formatted.
Modified:
branches/nmrglue/data_store/nmrglue.py
Modified: branches/nmrglue/data_store/nmrglue.py
URL:
http://svn.gna.org/viewcvs/relax/branches/nmrglue/data_store/nmrglue.py?rev=27023&r1=27022&r2=27023&view=diff
==============================================================================
--- branches/nmrglue/data_store/nmrglue.py (original)
+++ branches/nmrglue/data_store/nmrglue.py Mon Dec 8 17:49:37 2014
@@ -37,12 +37,12 @@
def __repr__(self):
# Header.
- text = "%-25s%-100s\n\n" % ("Data structure", "Value")
+ text = "\n%-25s%-100s\n\n" % ("Data structure", "Value")
# Data structures.
for name in dir(self):
# Skip Nmrglue and derived class methods.
- if name in Nmrglue.__dict__ or name in self.__class__.__dict__:
+ if name in Element.__dict__ or name in Nmrglue.__dict__ or name in
self.__class__.__dict__:
continue
# Skip special objects.
@@ -54,6 +54,7 @@
# The data.
if name == 'data':
+ name = "data.shape"
obj = obj.shape
# Generate the text.
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits