def __init__(self, *args, **kwargs):
self.formatter_class = kwargs.get('<STR_LIT>', argparse.RawDescriptionHelpFormatter)<EOL>if '<STR_LIT:description>' in kwargs:<EOL><INDENT>self.doc = '<STR_LIT:description>'<EOL><DEDENT>else:<EOL><INDENT>self.doc = '<STR_LIT>'<EOL><DEDENT>if '<STR_LIT:description>' not in kwargs and '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs[self.doc] = sys._getframe().f_back.f_globals.get('<STR_LIT>')<EOL><DEDENT>if '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs['<STR_LIT>'] = self.formatter_class<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.preprocessor = kwargs.pop('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>self.preprocessor = None<EOL><DEDENT>for k in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT:name>', '<STR_LIT>'):<EOL><INDENT>if k in kwargs:<EOL><INDENT>setattr(self, k, kwargs.pop(k))<EOL><DEDENT>else:<EOL><INDENT>setattr(self, k, None)<EOL><DEDENT><DEDENT>self.config_map = {}<EOL>self.compile = None<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>self.argparser = kwargs.pop('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>self.argparser = ArgumentParser(**kwargs)<EOL><DEDENT>for a in args:<EOL><INDENT>if isinstance(a, arg):<EOL><INDENT>a.apply(self.argparser, self, self.get_name())<EOL><DEDENT><DEDENT>self.children = []<EOL>
Initialize CommandDecorator with global arguments

        >>> from argdeco import arg, CommandDecorator
        >>> command = CommandDecorator(
        ...
        ... )

        # Arguments

        description:
          Description in argument, also causes that command's function __doc__
          documentation will be also passed as description to add_argument()
          by default.

          If not specified, the calling modules __doc__ will be used as epilogue
          (and all other commands __doc__ will be passed as epilogue).

        formatter_class:
          Default formatter class is argparse.RawDescriptionHelpFormatter.  You
          can override this with passing another formatter_class.

        preprocessor:
          Instead of passing a compile paramter to execute later, you can also
          pass a preprocessor function here.

          Preprocessor function is getting args object as positional argument
          and expanded arguments as kwargs.

          It may return

          # a tuple of (args, kwargs) to be passed to command function
          # a dict, to be passed as kwargs to command function
          # a tuple or list (with not per accident having exact two items
            beeing a tuple and kwargs) passed as positional args to command
            function

        argparser:
          (internal) You may pass an existing argparser instance.

        commands:
          (internal) An object returned from argparser.add_subparsers() method.

        compiler_factory:
          Passing a compiler_factory is another way of providing a argument
          compiler.

          `compiler_factory` is expected to be a function getting one parameter
          -- the args as returned from `argparser.parseargs()``.  It is espected
          to return a dictionary like object.  For each given argument the
          name of the argument is computed and the corresponding configuration
          item is set.

          Example:

              >>> command = CommandDecorator(compiler_factory=lambda x: {})
              >>> @command('foo', arg('--bar'))
              >>> def cmd(cfg):
              ...     assert cfg['foo.bar'] == '1'
              >>> command.execute(['foo', '--bar', '1'])