예제 #1
0
    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))
예제 #2
0
 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))
예제 #3
0
파일: generate.py 프로젝트: Onjrew/OpenEV
 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))