[svn r7108] DL: fettled to be able to find cavestats binary in this fucked-up directory structure

This commit is contained in:
expo
2005-08-12 22:29:26 +02:00
parent a280d70efb
commit 2932c23cac

View File

@@ -1,6 +1,7 @@
#!/usr/bin/python
import sys,csv,os,cStringIO
CS_BINARY = "/home/expo/build/survex-1.1-mark/src/cavestats"
N = 30
# Utility functions
@@ -44,7 +45,7 @@ def parse_csvfile():
caveslist = []
print "Calculating SMK-system extent... ",
os.popen("cavern dataset/loser/smk-system -o noinfo/smk-system.3d")
l,d,w = map(float, chomp(os.popen("cavestats noinfo/smk-system -c ").read()).split("\t"))
l,d,w = map(float, chomp(os.popen(CS_BINARY + " noinfo/smk-system -c ").read()).split("\t"))
caveslist.append(["", l,d,w, {"Name" : "<i>Schwarzmooskogelh&ouml;hlensystem</i>", "Autogen file" : ""}])
print "done\nParsing CSV file"
cavetabfile = file("noinfo/CAVETAB2.CSV")
@@ -68,7 +69,7 @@ def parse_csvfile():
if((cave["Area"]=="1626") and (number not in ['LA11', 'LA12'])): continue
prefix = dataset_prefix(number.lower())
stats = os.popen("cavestats noinfo/all -cs " + prefix).read()
stats = os.popen(CS_BINARY + " noinfo/all -cs " + prefix).read()
if(stats.find("No") != -1):
continue # don't trust the rather erratic data in the table
#if(cave["Length"]): print number, "length:", cave["Length"]