Ignore:
Timestamp:
03/02/09 16:35:28 (3 years ago)
Author:
Peter Peterson
Message:

Same treatment as entries, but with attributes. Refs #101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bindings/python/nxs/napi.py

    r1185 r1186  
    969969        storage = c_int(0) 
    970970        status = nxlib.nxigetnextattr_(self.handle,name,_ref(length),_ref(storage)) 
     971        if status == EOD: 
     972            return (None, None, None) 
    971973        if status == ERROR or status == EOD: 
    972974            raise NeXusError, "Could not get next attr: %s"%(self._loc()) 
     
    10471049        if status == ERROR: 
    10481050            raise NeXusError, "Could not write attr %s: %s"%(name,self._loc()) 
     1051 
     1052    def getattrs(self): 
     1053        """ 
     1054        Returns a dicitonary of the attributes on the current node. 
     1055 
     1056        This is a second form of attrs(self). 
     1057        """ 
     1058        result = {} 
     1059        for (name, value) in self.attrs(): 
     1060            result[name] = value 
     1061        return result 
    10491062 
    10501063    def attrs(self): 
Note: See TracChangeset for help on using the changeset viewer.