def __init__(self, path, data=None): ConsoleP.__init__(self, 'pkgbuild') if path is None: self.eval = shlex.shlex(data, posix=True) else: self.eval = shlex.shlex(open(path, "r").read(), posix=True) self.eval.whitespace = " \t" self.eval.wordchars += '.:/${}-~' self.eval.commenters = '#' self.state = self.ST_VAR self.scope = Scope() self.parse()
def __init__(self): self.scopes = [] self.scopes.append({"pkgdir" : "", "srcdir" : "", "startdir" : ""}) self.current = 0 ConsoleP.__init__(self, 'pkgbuild')
def __init__(self): self.scopes = [] self.scopes.append({"pkgdir": "", "srcdir": "", "startdir": ""}) self.current = 0 ConsoleP.__init__(self, 'pkgbuild')