/usr/share/pyshared/plasTeX/ConfigManager/Integer.py is in python-plastex 0.9.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from Generic import GenericOption, GenericParser, GenericArgument
from plasTeX.ConfigManager import InvalidOptionError
class IntegerParser(GenericParser): pass
class IntegerOption(IntegerParser, GenericOption):
""" Integer configuration option """
synopsis = 'n'
def _hasFollowingArgument(self, args, delim):
""" Return boolean indicating the existence of another argument """
return 0
def cast(self, data):
name = self.name
if self.actual: name = self.actual
if data is None: return
try: return int(data)
except: raise InvalidOptionError(name, data, type='int')
class IntegerArgument(GenericArgument, IntegerOption):
""" Integer command-line argument """
|