comparison Compilable.py @ 10:09b39021c4af

Make filename an attribute of file.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Wed, 14 Nov 2012 21:44:53 +0100
parents 3a56cd936c59
children
comparison
equal deleted inserted replaced
9:2263a283203c 10:09b39021c4af
74 retVal.append(n) 74 retVal.append(n)
75 else: 75 else:
76 del replace[n] 76 del replace[n]
77 77
78 return retVal 78 return retVal
79 79
80 @staticmethod 80 @staticmethod
81 def getPathname(str): 81 def getPathname(str):
82 pattern = '^\s*#include ["<]([^">]+)[">]' 82 pattern = '^\s*#include ["<]([^">]+)[">]'
83 prog = re.compile(pattern) 83 prog = re.compile(pattern)
84 m = prog.search(str) 84 m = prog.search(str)
85 include = m.group(1) 85 include = m.group(1)
86 return include 86 return include
87 87
88 88
89 @staticmethod 89 @staticmethod
90 def getClassname(str): 90 def getClassname(str):
91 include = Compilable.getPathname(str) 91 include = Compilable.getPathname(str)
92 92