def get_attribute(self, i, a): """Reads the value "v" of the attribute "a" with index "i" from DSN; see the self.attributes dictionary for more info.""" if a['type'] == 'INTEGER': v, retcode = hspf.wdbsgipy(self.wdm, self.number, i, a['length']) var = '%d' if a['type'] == 'REAL': v, retcode = hspf.wdbsgrpy(self.wdm, self.number, i, a['length']) var = '%.6e' if a['type'] == 'CHARACTER': v, retcode = hspf.wdbsgcpy(self.wdm, self.number, i, a['length']) var = '%s' return v, retcode, var
def get_attribute(self, i, a): """Reads the value "v" of the attribute "a" with index "i" from DSN; see the self.attributes dictionary for more info.""" if a['type'] == 'INTEGER': v, retcode = hspf.wdbsgipy(self.wdm,self.number, i, a['length']) var = '%d' if a['type'] == 'REAL': v, retcode = hspf.wdbsgrpy(self.wdm,self.number, i, a['length']) var = '%.6e' if a['type'] == 'CHARACTER': v, retcode = hspf.wdbsgcpy(self.wdm,self.number, i, a['length']) var = '%s' return v, retcode, var