Improved finding Matlab on Windows machines. Needs testing on computers that have multiple version installed

This commit is contained in:
hbristow
2013-07-31 11:24:28 +10:00
parent 627b9df85f
commit 58ca8ed97f
3 changed files with 44 additions and 47 deletions

View File

@@ -9,8 +9,13 @@ class MatlabWrapperGenerator(object):
ns = {}
for file in input_files:
# get the file name
name = re.findall('include/opencv2/([^./]+)', file)[0]
#name = os.path.splitext(os.path.basename(file))[0]
# TODO: Is there a cleaner way to do this?
try:
name = re.findall('include/opencv2/([^./]+)', file)[0]
except:
name = os.path.splitext(os.path.basename(file))[0]
# add the file to the namespace
try:
ns[name] = ns[name] + parser.parse(file)
except KeyError: