Lines Matching refs:Values
30 'Values',
189 format string controlling how short options with values are
779 def process(self, opt, value, values, parser):
789 self.action, self.dest, opt, value, values, parser)
791 def take_action(self, action, dest, opt, value, values, parser):
793 setattr(values, dest, value)
795 setattr(values, dest, self.const)
797 setattr(values, dest, True)
799 setattr(values, dest, False)
801 values.ensure_value(dest, []).append(value)
803 values.ensure_value(dest, []).append(self.const)
805 setattr(values, dest, values.ensure_value(dest, 0) + 1)
836 class Values:
849 if isinstance(other, Values):
858 Update the option values from an arbitrary dictionary, but only
871 Update the option values from an arbitrary dictionary,
926 values for each destination [1]
1162 if true, option default values are processed similarly to option
1163 values from the command line: that is, they are passed to the
1178 values : Values
1179 the set of option values currently being accumulated. Only
1182 Because of the 'rargs', 'largs', and 'values' attributes,
1272 self.values = None
1322 return Values(self.defaults)
1331 return Values(defaults)
1368 def parse_args(self, args=None, values=None):
1371 values : Values = None)
1372 -> (values : Values, args : [string])
1378 (values, args) where 'values' is a Values instance (with all
1379 your option values) and 'args' is the list of arguments left
1383 if values is None:
1384 values = self.get_default_values()
1397 self.values = values
1400 stop = self._process_args(largs, rargs, values)
1405 return self.check_values(values, args)
1407 def check_values(self, values, args):
1409 check_values(values : Values, args : [string])
1410 -> (values : Values, args : [string])
1412 Check that the supplied option values and leftover arguments are
1413 valid. Returns the option values and leftover arguments
1416 values; subclasses may override as desired.
1418 return (values, args)
1420 def _process_args(self, largs, rargs, values):
1423 values : Values)
1425 Process command-line arguments and populate 'values', consuming
1440 self._process_long_opt(rargs, values)
1444 self._process_short_opts(rargs, values)
1480 def _process_long_opt(self, rargs, values):
1515 option.process(opt, value, values, self)
1517 def _process_short_opts(self, rargs, values):
1551 option.process(opt, value, values, self)