Assemble the commands.
551482
def make_wire_commands(*ids):
  """"""
  cmd_to_wire = {
      cmd: sum(ord(c) << (i * 8) for i, c in enumerate(cmd)) for cmd in ids
  }
  wire_to_cmd = {wire: cmd for cmd, wire in six.iteritems(cmd_to_wire)}
  return cmd_to_wire, wire_to_cmd
1036698
def combine_commands(*commands):
    """"""

    class CombinedCommand(Command):

        def initialize_options(self):
            self.commands = []
            for C in commands:
                self.commands.append(C(self.distribution))
            for c in self.commands:
                c.initialize_options()

        def finalize_options(self):
            for c in self.commands:
                c.finalize_options()

        def run(self):
            for c in self.commands:
                c.run()

    return CombinedCommand
1176268
def add_commands(self):
        
        self.parser.add_argument(
            '-d',
            action="count",
            **self.config.default.debug.get_arg_parse_arguments())
1131002
def _assemble(self):
        """"""
        for stmt in self.statements:
            pol = self.processed_policies[stmt.uuid]
            if _is_whitelisted(stmt):
                self._dispatch(stmt, 'assemble', self.model, self.agent_set,
                               pol.parameters)
1330394
def setup(self):
        """"""
        if not isinstance(self.filePath, str):
            raise TypeError("File path is not a string!")
        if self.controller is None:
            raise ValueError("Command controller hasn't been specified!")
1268596
def assemble(self, blueprint, quota):
        """"""

        # Reset the blueprint
        blueprint.reset()

        # Assemble the documents
        documents = []
        for i in range(0, int(quota)):
            documents.append(blueprint.assemble())

        return documents
587038
def walk_commands(self):
        """"""
        for command in tuple(self.all_commands.values()):
            yield command
            if isinstance(command, GroupMixin):
                yield from command.walk_commands()
344724
def _assemble_linux_cmdline(kv):
    
    # try to be compatible with Py2.4
    parts = []
    for k, v in kv.items():
        if v is None:
            parts.append(str(k))
        else:
            parts.append('%s=%s' % (k, v))
    return ' '.join(parts)
714539
def cmdline(argv, flags):
    """"""
    rules = dict([(flag, {'flags': ["--%s" % flag]}) for flag in flags])
    return parse(argv, rules)
1045033
def _process_commands(self, commands):
        """"""
        if commands is None:
            return
        for cmd_list in commands:
            try:
                cmd_list = split_command_line(cmd_list)
                cmd = cmd_list[0]
                if cmd == 'gdb_port':
                    if len(cmd_list) < 2:
                        LOG.error("Missing port argument")
                    else:
                        self._args.port_number = int(cmd_list[1], base=0)
                elif cmd == 'telnet_port':
                    if len(cmd_list) < 2:
                        LOG.error("Missing port argument")
                    else:
                        self._args.telnet_port = int(cmd_list[1], base=0)
                elif cmd == 'echo':
                    self.echo_msg = ' '.join(cmd_list[1:])
                else:
                    LOG.error("Unsupported command: %s" % ' '.join(cmd_list))
            except IndexError:
                pass
1144257
def do_command(self, words):
        """"""
        self.output = ''
        self._do_command(words)
        return self.output
124517
def _attach_subcommands(self):
        
        if self.subcommands:
            self.subparsers = self.parser.add_subparsers()

            for subcommand in self.subcommands:
                subparser = self.subparsers.add_parser(subcommand.name,
                                                       help=subcommand.title)
                if subcommand.handler:
                    self._register_handler(subparser, subcommand.handler)
                subcommand._init(subparser)
848320
def execute(self):
        """"""
        if self._cli_arguments['cfn']:
            generate_sample_cfn_module(self.env_root)
        elif self._cli_arguments['sls']:
            generate_sample_sls_module(self.env_root)
        elif self._cli_arguments['sls-tsc']:
            generate_sample_sls_tsc_module(self.env_root)
        elif self._cli_arguments['stacker']:
            generate_sample_stacker_module(self.env_root)
        elif self._cli_arguments['tf']:
            generate_sample_tf_module(self.env_root)
        elif self._cli_arguments['cdk-tsc']:
            generate_sample_cdk_tsc_module(self.env_root)
        elif self._cli_arguments['cdk-py']:
            generate_sample_cdk_py_module(self.env_root)
        elif self._cli_arguments['cdk-csharp']:
            generate_sample_cdk_cs_module(self.env_root)
1350844
def walk_commands(self):
        """"""
        from .core import GroupMixin
        for command in self.__cog_commands__:
            if command.parent is None:
                yield command
                if isinstance(command, GroupMixin):
                    yield from command.walk_commands()
1252210
def load_subcommand(subparsers):
    """"""
    parser_analyze = subparsers.add_parser('echo_conf', help='Echo sample configuration file')
    parser_analyze.set_defaults(func=echo_conf)
724867
def main():
    """"""
    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers()

    appengine.register_commands(subparsers)
    requirements.register_commands(subparsers)
    pylint.register_commands(subparsers)

    args = parser.parse_args()
    args.func(args)
1080389
def assemble(self):
		

		sp_r = self.split_run()
		ar_r = self.argument_run(sp_r)
		de_r = self.dereference_run(ar_r)
		program = self.program_run(de_r)
		return program