trying to implement generic data structure import
This commit is contained in:
parent
d4bf29e4ff
commit
c3e072e952
@ -82,11 +82,15 @@ class GenericDataStructure(object):
|
|||||||
base working on.
|
base working on.
|
||||||
'''
|
'''
|
||||||
def __init__(self, stexp=None, folderdepth=4, **kwargs):
|
def __init__(self, stexp=None, folderdepth=4, **kwargs):
|
||||||
dbRegExp = {}
|
|
||||||
structExpression = []
|
structExpression = []
|
||||||
depth = 0
|
depth = 0
|
||||||
while stexp is not os.path.sep:
|
while stexp is not os.path.sep:
|
||||||
|
try:
|
||||||
[stexp, tlexp] = os.path.split(stexp)
|
[stexp, tlexp] = os.path.split(stexp)
|
||||||
|
except AttributeError:
|
||||||
|
rootExpression = None
|
||||||
|
structExpression = None
|
||||||
|
break
|
||||||
structExpression.append(tlexp)
|
structExpression.append(tlexp)
|
||||||
depth += 1
|
depth += 1
|
||||||
if depth is folderdepth:
|
if depth is folderdepth:
|
||||||
@ -95,7 +99,7 @@ class GenericDataStructure(object):
|
|||||||
structExpression.reverse()
|
structExpression.reverse()
|
||||||
|
|
||||||
self.folderDepth = folderdepth
|
self.folderDepth = folderdepth
|
||||||
self.dataBaseDict = kwargs
|
self.dataBaseDict = {}
|
||||||
|
|
||||||
|
|
||||||
class SeiscompDataStructure(object):
|
class SeiscompDataStructure(object):
|
||||||
|
Loading…
Reference in New Issue
Block a user