def _dispatch_gen(self):
if not os.path.isdir(self._args.output):<EOL><INDENT>raise exception.Base("<STR_LIT>" % self._args.output)<EOL><DEDENT>if not os.path.isfile(self._args.models_definition):<EOL><INDENT>if not self.check_package_exists(self._args.models_definition):<EOL><INDENT>raise exception.Base("<STR_LIT>" % self._args.models_definition)<EOL><DEDENT><DEDENT>from prestans.devel.gen import Preplate<EOL>preplate = Preplate(<EOL>template_type=self._args.template,<EOL>models_definition=self._args.models_definition,<EOL>namespace=self._args.namespace,<EOL>filter_namespace=self._args.filter_namespace,<EOL>output_directory=self._args.output)<EOL>preplate.run()<EOL>
Process the generate subset of commands.