Пример #1
0
 def extract(self, state):
     try:
         command = self._exscript.getCommandValue().pop()
     except ValueError:
         # Command wasn't specified
         return
     if command in self._exscript.cmdPosOpts:
         format = self._exscript.cmdPosOpts[command]
         pos_opts = self.getPosOpts(state)
         d = seqIntoDict(pos_opts, format)
         self._exscript.state.addObjects(d, 'cmdPosOpts')
Пример #2
0
 def extract(self, state):
     try:
         command = self._exscript.getCommandValue().pop()
     except ValueError:
         # Command wasn't specified
         return
     if command in self._exscript.cmdPosOpts:
         format = self._exscript.cmdPosOpts[command]
         pos_opts = self.getPosOpts(state)
         d = seqIntoDict(pos_opts, format)
         self._exscript.state.addObjects(d, 'cmdPosOpts')
Пример #3
0
 def setPosOpts(self, pos_opts):
     seqIntoDict([], pos_opts)
     self._posOpts = pos_opts
Пример #4
0
 def _extractGetoptPos(self, state, positional):
     source_name = self.getSourceName()
     pos_opts = self.posOpts
     d = seqIntoDict(positional, pos_opts)
     state.addObjects(d, source_name, positional)
Пример #5
0
 def setPosOpts(self, pos_opts):
     seqIntoDict([], pos_opts)
     self._posOpts = pos_opts
Пример #6
0
 def _extractGetoptPos(self, state, positional):
     source_name = self.getSourceName()
     pos_opts = self.posOpts
     d = seqIntoDict(positional, pos_opts)
     state.addObjects(d, source_name, positional)