コード例 #1
0
ファイル: file.py プロジェクト: ulm/portage-historical
 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
コード例 #6
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()
コード例 #7
0
ファイル: domain_parser.py プロジェクト: sm2x/gnuHealth
    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
ファイル: cqlParser.py プロジェクト: bloomonkey/cheshire3
 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
ファイル: tree.py プロジェクト: OpenTreeOfLife/phylografter
 def __init__(self, infile):
     shlex.__init__(self, infile)
     self.commenters = ''
     self.wordchars = self.wordchars + "-.|/"
     self.quotes = "'"
コード例 #12
0
ファイル: cql_parser.py プロジェクト: rerowep/rero-ils
 def __init__(self, thing, query):
     """Constructor."""
     shlex.__init__(self, thing)
     self.wordchars += '!@#$%^&*-+{}[];,.?|~`:\\'
     self.query = query
コード例 #13
0
ファイル: newick.py プロジェクト: dschwilk/dwstree
 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
ファイル: CQLParser.py プロジェクト: HerveMignot/books-macosx
 def __init__(self, thing):
     shlex.__init__(self, thing)
     self.wordchars += "!@#$%^&*-+{}[];,.?|~`:\\"
     self.wordchars += ''.join(map(chr, range(128, 254)))
コード例 #20
0
ファイル: helpers.py プロジェクト: Clam-/pyBurlyBot
 def __init__(self, *args, **kwargs):
     shlex.__init__(self, *args, **kwargs)
     # self.debug = 5
     self.commenters = ""