We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af24202 commit 768a535Copy full SHA for 768a535
shapefile.py
@@ -549,11 +549,13 @@ def records(self):
549
"""Returns all records in a dbf file."""
550
if not self.numRecords:
551
self.__dbfHeader()
552
+ records = []
553
f = self.__getFileObj(self.dbf)
554
f.seek(self.__dbfHeaderLength())
- flat = unpack(self.__recStruct.format * self.numRecords, f.read(self.__recStruct.size * self.numRecords))
555
- rowlen = len(self.fields) - 1
556
- records = list(izip(*(iter(flat),) * rowlen))
+ for i in range(self.numRecords):
+ r = self.__record()
557
+ if r:
558
+ records.append(r)
559
return records
560
561
def iterRecords(self):
0 commit comments