示例#1
0
 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
示例#2
0
文件: das.py 项目: jtomase/matplotlib
    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
示例#3
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
示例#4
0
    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
示例#5
0
文件: dds.py 项目: jtomase/matplotlib
    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()
示例#7
0
    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()
示例#8
0
 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
示例#9
0
 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
示例#10
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')
示例#11
0
 def __init__(self, infile):
     shlex.__init__(self, infile)
     self.commenters = ''
     self.wordchars = self.wordchars + "-.|/"
     self.quotes = "'"
示例#12
0
 def __init__(self, thing, query):
     """Constructor."""
     shlex.__init__(self, thing)
     self.wordchars += '!@#$%^&*-+{}[];,.?|~`:\\'
     self.query = query
示例#13
0
 def __init__(self, infile):
     shlex.__init__(self, infile)
     self.commenters = ''
     self.wordchars = self.wordchars+'-.'
     self.quotes = "'"
示例#14
0
文件: loader.py 项目: ned21/aquilon
    def __init__(self, filename):
        self.filename = filename
        self.macros = {}

        input = file(filename, 'rt')
        return shlex.__init__(self, input, posix=True)
示例#15
0
文件: loader.py 项目: piojo/aquilon
    def __init__(self, filename):
        self.filename = filename
        self.macros = {}

        input = file(filename, 'rt')
        return shlex.__init__(self, input, posix=True)
示例#16
0
文件: CQLParser.py 项目: GSA/PyZ3950
 def __init__(self, thing):
     shlex.__init__(self, thing)
     self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\"
     self.wordchars += "".join(map(chr, range(128, 254)))
示例#17
0
	def __init__(self, *args, **kwargs):
		shlex.__init__(self, *args, **kwargs)
示例#18
0
	def __init__(self, *args, **kwargs):
		shlex.__init__(self, *args, **kwargs)
		#self.debug = 5
		self.commenters = ""
示例#19
0
 def __init__(self, thing):
     shlex.__init__(self, thing)
     self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\"
     self.wordchars += ''.join(map(chr, range(128, 254)))
示例#20
0
 def __init__(self, *args, **kwargs):
     shlex.__init__(self, *args, **kwargs)
     # self.debug = 5
     self.commenters = ""