Mercurial > hg > audiodb
comparison bindings/python/pyadb.py @ 638:c014e4d5b45d
added a status hook to the high level python bindings. Hopefully it works, if it doesn't sorry, can't get a working copy of audioDB lib on my box as I need to recompile gsoap and the outside world connection is down...
author | map01bf |
---|---|
date | Tue, 29 Sep 2009 17:31:42 +0000 |
parents | 41ef9e165c38 |
children | 159becb0701e |
comparison
equal
deleted
inserted
replaced
637:be94366c6aa2 | 638:c014e4d5b45d |
---|---|
128 result = _pyadb._pyadb_queryFromKey(self._db, key, **self.configQuery) | 128 result = _pyadb._pyadb_queryFromKey(self._db, key, **self.configQuery) |
129 elif featData: | 129 elif featData: |
130 raise NotImplementedError("direct data query not yet implemented. Sorry.") | 130 raise NotImplementedError("direct data query not yet implemented. Sorry.") |
131 return Pyadb.Result(result, self.configQuery) | 131 return Pyadb.Result(result, self.configQuery) |
132 | 132 |
133 def status(self): | |
134 '''update attributes and return them as a dict''' | |
135 self._updateDBAttributes() | |
136 return { "numFiles" : self.numFiles, | |
137 "dims" : self.dims, | |
138 "dudCount" : self.dudCount, | |
139 "nullCount": self.nullCount, | |
140 "length" : self.length, | |
141 "data_region_size" : self.data_region_size, | |
142 "l2Normed" : self.l2Normed, | |
143 "hasPower" : self.hasPower, | |
144 "hasTimes" : self.hasTimes, | |
145 "usesRefs" : self.usesRefs} | |
133 ###internal methods### | 146 ###internal methods### |
134 def _updateDBAttributes(self): | 147 def _updateDBAttributes(self): |
135 '''run _pyadb_status to fill/update the database level flags and info''' | 148 '''run _pyadb_status to fill/update the database level flags and info''' |
136 rawFlags = long(0) | 149 rawFlags = long(0) |
137 (self.numFiles, | 150 (self.numFiles, |