def __init__(self, source, sourcing_command=None, env={}): shlex.__init__(self, source, posix=True) self.wordchars += "${}/." if sourcing_command != None: self.source = allow_sourcing self.env = env self.__pos = 0
def __init__(self, das, url, dataset): shlex.__init__(self, das) self.url = url self._dataset = dataset # Attribute target when parsing. self._target = self._dataset # Add punctuation to words. #self.wordchars += '/_%.-+' self.wordchars = WORDCHARS
def __init__(self, dds, url, cache=None, username=None, password=None): shlex.__init__(self, dds) self.url = url[:-4] # strip .dds from url # Info for the proxy. self.cache = cache self.username = username self.password = password # Add punctuation to words. self.wordchars = WORDCHARS
def __init__(self, instream=None): shlex.__init__(self, io.StringIO(instream), posix=True) self.commenters = '' self.quotes = '"' class DummyWordchars(object): "Simulate str that contains all chars except somes" def __contains__(self, item): return item not in (u':', u'>', u'<', u'=', u'!', u'"', u';', u'(', u')') self.wordchars = DummyWordchars()
def __init__(self, source, sourcing_command=None, env=None, infile=None): """ :param source: file handle to read from :param sourcing_command: token to treat as an include command :type sourcing_command: either None, or a string; if None, no includes are allowed in this parsing :param env: initial environment to use for variable interpolation :type env: must be a mapping; if None, an empty dict is used """ self.__dict__['state'] = ' ' shlex.__init__(self, source, posix=True, infile=infile) self.wordchars += "@${}/.-+/:~^*" self.wordchars = frozenset(self.wordchars) if sourcing_command is not None: self.source = sourcing_command if env is None: env = {} self.env = env self.__pos = 0
def __init__(self, thing): shlex.__init__(self, thing) self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\" # self.wordchars += ''.join(map(chr, range(128,254))) self.wordchars = self.wordchars.decode('utf-8')
def __init__(self, infile): shlex.__init__(self, infile) self.commenters = '' self.wordchars = self.wordchars + "-.|/" self.quotes = "'"
def __init__(self, thing, query): """Constructor.""" shlex.__init__(self, thing) self.wordchars += '!@#$%^&*-+{}[];,.?|~`:\\' self.query = query
def __init__(self, infile): shlex.__init__(self, infile) self.commenters = '' self.wordchars = self.wordchars+'-.' self.quotes = "'"
def __init__(self, filename): self.filename = filename self.macros = {} input = file(filename, 'rt') return shlex.__init__(self, input, posix=True)
def __init__(self, thing): shlex.__init__(self, thing) self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\" self.wordchars += "".join(map(chr, range(128, 254)))
def __init__(self, *args, **kwargs): shlex.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): shlex.__init__(self, *args, **kwargs) #self.debug = 5 self.commenters = ""
def __init__(self, thing): shlex.__init__(self, thing) self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\" self.wordchars += ''.join(map(chr, range(128, 254)))
def __init__(self, *args, **kwargs): shlex.__init__(self, *args, **kwargs) # self.debug = 5 self.commenters = ""