Changeset 3337
- Timestamp:
- 02/18/08 18:11:35 (17 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkbanner
r3335 r3337 234 234 dest="logo", 235 235 default=u"/usr/share/pykota/logos/pykota.jpeg", 236 help=_("The image to use as the banner'slogo. The logo will be drawn at the center top of the page. The default logo is %default"))236 help=_("The image to use as a logo. The logo will be drawn at the center top of the page. The default logo is %default")) 237 237 parser.add_option("-p", "--pagesize", 238 238 type="string", -
pykota/trunk/pykota/commandline.py
r3335 r3337 44 44 loginvalidparam(opt, value, option.default, \ 45 45 _("Allowed range is (0..99)")) 46 setattr(optionparser.values, option.dest, option.default) 47 else : 48 setattr(optionparser.values, option.dest, value) 49 50 def checkandset_positiveint(option, opt, value, optionparser) : 51 """Checks if an option argument is a positive integer and validates the option if it is the case.""" 52 if not (value >= 0) : 53 loginvalidparam(opt, value, option.default, \ 54 _("Value must be positive")) 55 setattr(optionparser.values, option.dest, option.default) 56 else : 57 setattr(optionparser.values, option.dest, value) 58 59 def checkandset_positivefloat(option, opt, value, optionparser) : 60 """Checks if an option argument is a positive integer and validates the option if it is the case.""" 61 if not (value >= 0.0) : 62 loginvalidparam(opt, value, option.default, \ 63 _("Value must be positive")) 46 64 setattr(optionparser.values, option.dest, option.default) 47 65 else :