mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
working on loading all the non*inlcuded svx files
This commit is contained in:
parent
c8163ab0cd
commit
a6e60c0bf7
@ -1201,6 +1201,7 @@ class LoadingSurvex():
|
|||||||
print("\n ", file=sys.stderr,end='')
|
print("\n ", file=sys.stderr,end='')
|
||||||
|
|
||||||
if path in self.svxfileslist:
|
if path in self.svxfileslist:
|
||||||
|
# We have already used os.normpath() so this is OK. "/../" and "//" have been simplified already.
|
||||||
message = f" * Warning. Duplicate detected. We have already seen this *include '{path}' from another survex file. Detected at callcount:{self.callcount} depth:{self.depthinclude}"
|
message = f" * Warning. Duplicate detected. We have already seen this *include '{path}' from another survex file. Detected at callcount:{self.callcount} depth:{self.depthinclude}"
|
||||||
print(message)
|
print(message)
|
||||||
print(message,file=flinear)
|
print(message,file=flinear)
|
||||||
@ -1464,14 +1465,36 @@ def FindAndLoadSurvex(survexblockroot):
|
|||||||
flinear.write(" - {:,} survex files in linear include list \n".format(len(svxfileslist)))
|
flinear.write(" - {:,} survex files in linear include list \n".format(len(svxfileslist)))
|
||||||
flinear.close()
|
flinear.close()
|
||||||
fcollate.close()
|
fcollate.close()
|
||||||
|
|
||||||
print("\n - {:,} runs of survex 'cavern' refreshing .3d files \n".format(svx_scan.caverncount),file=sys.stderr)
|
print("\n - {:,} runs of survex 'cavern' refreshing .3d files \n".format(svx_scan.caverncount),file=sys.stderr)
|
||||||
|
|
||||||
svx_scan = None # Hmm. Does this actually delete all the instance variables if they are lists, dicts etc.?
|
svx_scan = None # Hmm. Does this actually delete all the instance variables if they are lists, dicts etc.?
|
||||||
print("\n - {:,} survex files in linear include list \n".format(len(svxfileslist)),file=sys.stderr)
|
print("\n - {:,} survex files in linear include list \n".format(len(svxfileslist)),file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
mem1 = get_process_memory()
|
mem1 = get_process_memory()
|
||||||
print(" - MEM:{:7.2f} MB END ".format(mem0),file=sys.stderr)
|
print(" - MEM:{:7.2f} MB END ".format(mem0),file=sys.stderr)
|
||||||
print(" - MEM:{:7.3f} MB USED".format(mem1-mem0),file=sys.stderr)
|
print(" - MEM:{:7.3f} MB USED".format(mem1-mem0),file=sys.stderr)
|
||||||
|
|
||||||
|
a = []
|
||||||
|
b=[]
|
||||||
|
|
||||||
|
for p in Path(settings.SURVEX_DATA).rglob('*.svx'):
|
||||||
|
if p.is_file():
|
||||||
|
po = p.relative_to(Path(settings.SURVEX_DATA))
|
||||||
|
pox = po.with_suffix('')
|
||||||
|
if str(pox) not in svxfileslist:
|
||||||
|
print(f"[{pox}]", file=sys.stderr)
|
||||||
|
a.append(pox)
|
||||||
|
else:
|
||||||
|
print("'", end=" ", file=sys.stderr)
|
||||||
|
b.append(pox)
|
||||||
|
|
||||||
|
print("=>", len(a), len(b), len(svxfileslist), file=sys.stderr)
|
||||||
|
|
||||||
|
for i in [0,1,2,3,4,5]:
|
||||||
|
print(f"==> [{svxfileslist[i]}]", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
svxfileslist = [] # free memory
|
svxfileslist = [] # free memory
|
||||||
|
|
||||||
# Before doing this, it would be good to identify the *equate and *entrance we need that are relevant to the
|
# Before doing this, it would be good to identify the *equate and *entrance we need that are relevant to the
|
||||||
|
Loading…
Reference in New Issue
Block a user