def include(self, filename): if filename[0] != '/': afile = os.path.join(os.path.dirname(self.filename),filename) else: afile = filename if not os.path.exists(afile): afile = filename fp = open(afile) self.startParsing(scmexpr.parse(fp))
def include(self, filename): if filename[0] != '/': # filename relative to file being parsed afile = os.path.join(os.path.dirname(self.filename), filename) else: afile = filename if not os.path.exists(afile): # fallback on PWD relative filename afile = filename #print "including file", afile fp = open(afile) self.startParsing(scmexpr.parse(fp))