1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 36 unchanged lines hidden (view full) --- 45All Rights Reserved 46''' 47 48# there's only one option parsing done, so make it global and add some 49# helper functions to make it work well. 50parser = optparse.OptionParser(usage=usage, version=version, 51 description=brief_copyright, 52 formatter=optparse.TitledHelpFormatter()) |
53parser.disable_interspersed_args() |
54 55# current option group 56group = None 57 58def set_group(*args, **kwargs): 59 '''set the current option group''' 60 global group 61 if not args and not kwargs: --- 246 unchanged lines hidden --- |