def Go(self): f=open(localizePath(modPath(os.path.join("hints", "%s.html" % self.hint), self.hintModule))) html=f.read() f.close() for tag, value in self.args.items(): html=html.replace("$%s" % tag.upper(), value.encode('utf-8')) self.browser.SetPage(html.decode('utf-8')) if not self.title: self.title=self.browser.GetOpenedPageTitle() if self.title: self.SetTitle(self.title) else: self.SetTitle(xlt("%s hint") % adm.appTitle)
def Go(self): f = open( localizePath( modPath(os.path.join("hints", "%s.html" % self.hint), self.hintModule))) html = f.read() f.close() for tag, value in self.args.items(): html = html.replace("$%s" % tag.upper(), value.encode('utf-8')) self.browser.SetPage(html.decode('utf-8')) if not self.title: self.title = self.browser.GetOpenedPageTitle() if self.title: self.SetTitle(self.title) else: self.SetTitle(xlt("%s hint") % adm.appTitle)
def getSqlKeywords(): global colKeywords global sqlKeywords if not sqlKeywords: f=open(modPath("kwlist.h", __name__)) lines=f.read() f.close() for line in lines.splitlines(): if line.startswith("PG_KEYWORD("): tokens=line.split(',') keyword=tokens[0][12:-1].lower() # RESERVED, UNRESERVED, TYPE_FUNC_NAME, COL_NAME if tokens[2].lstrip().startswith('COL_NAME'): colKeywords.append(keyword) else: sqlKeywords.append(keyword) colKeywords.extend(moreKeywords) return sqlKeywords
def getSqlKeywords(): global colKeywords global sqlKeywords if not sqlKeywords: f = open(modPath("kwlist.h", __name__)) lines = f.read() f.close() for line in lines.splitlines(): if line.startswith("PG_KEYWORD("): tokens = line.split(',') keyword = tokens[0][12:-1].lower() # RESERVED, UNRESERVED, TYPE_FUNC_NAME, COL_NAME if tokens[2].lstrip().startswith('COL_NAME'): colKeywords.append(keyword) else: sqlKeywords.append(keyword) colKeywords.extend(moreKeywords) return sqlKeywords