removed unused headerLen property. added info_clear() method

This commit is contained in:
Philip Eisenlohr 2012-02-23 13:54:38 +00:00
parent 53d7076d05
commit 6b8bebad49
1 changed files with 4 additions and 2 deletions

View File

@ -76,11 +76,9 @@ class ASCIItable():
if m:
self.info = [self.__IO__['in'].readline().strip() for i in xrange(1,int(m.group(1)))]
self.labels = self.__IO__['in'].readline().split()
self.headerLen = int(m.group(1)) + 1
else:
self.info = []
self.labels = firstline.split()
self.headerLen = 1
self.__IO__['validReadSize'] = len(self.labels)
try:
self.__IO__['dataStart'] = self.__IO__['in'].tell()
@ -107,6 +105,10 @@ class ASCIItable():
for item in what: self.info_append(item)
else: self.info += [str(what)]
# ------------------------------------------------------------------
def info_clear(self):
self.info = []
# ------------------------------------------------------------------
def data_rewind(self):
self.__IO__['in'].seek(self.__IO__['dataStart'])