removed unused headerLen property. added info_clear() method
This commit is contained in:
parent
53d7076d05
commit
6b8bebad49
|
@ -76,11 +76,9 @@ class ASCIItable():
|
||||||
if m:
|
if m:
|
||||||
self.info = [self.__IO__['in'].readline().strip() for i in xrange(1,int(m.group(1)))]
|
self.info = [self.__IO__['in'].readline().strip() for i in xrange(1,int(m.group(1)))]
|
||||||
self.labels = self.__IO__['in'].readline().split()
|
self.labels = self.__IO__['in'].readline().split()
|
||||||
self.headerLen = int(m.group(1)) + 1
|
|
||||||
else:
|
else:
|
||||||
self.info = []
|
self.info = []
|
||||||
self.labels = firstline.split()
|
self.labels = firstline.split()
|
||||||
self.headerLen = 1
|
|
||||||
self.__IO__['validReadSize'] = len(self.labels)
|
self.__IO__['validReadSize'] = len(self.labels)
|
||||||
try:
|
try:
|
||||||
self.__IO__['dataStart'] = self.__IO__['in'].tell()
|
self.__IO__['dataStart'] = self.__IO__['in'].tell()
|
||||||
|
@ -107,6 +105,10 @@ class ASCIItable():
|
||||||
for item in what: self.info_append(item)
|
for item in what: self.info_append(item)
|
||||||
else: self.info += [str(what)]
|
else: self.info += [str(what)]
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def info_clear(self):
|
||||||
|
self.info = []
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
def data_rewind(self):
|
def data_rewind(self):
|
||||||
self.__IO__['in'].seek(self.__IO__['dataStart'])
|
self.__IO__['in'].seek(self.__IO__['dataStart'])
|
||||||
|
|
Loading…
Reference in New Issue