def _runner(self, classpath, main, jvm_options, args):
    'Runner factory.\n\n        Called via Executor.execute().\n        '
    command = self._create_command(classpath, main, jvm_options, args)

    class Runner(self.Runner):

        @property
        def executor(this):
            return self

        @property
        def command(self):
            return list(command)

        def run(this, stdout=None, stderr=None, stdin=None, cwd=None):
            nailgun = None
            try:
                nailgun = self._get_nailgun_client(jvm_options, classpath, stdout, stderr, stdin)
                logger.debug('Executing via {ng_desc}: {cmd}'.format(ng_desc=nailgun, cmd=this.cmd))
                return nailgun.execute(main, cwd, *args)
            except (NailgunClient.NailgunError, self.InitialNailgunConnectTimedOut) as e:
                self.terminate()
                raise self.Error('Problem launching via {ng_desc} command {main} {args}: {msg}'.format(ng_desc=(nailgun or '<no nailgun connection>'), main=main, args=' '.join(args), msg=e))
    return Runner()
Runner factory.

Called via Executor.execute().
def _runner(self, classpath, main, jvm_options, args):
    'Runner factory.\n\n        Called via Executor.execute().\n        '
    command = self._create_command(classpath, main, jvm_options, args)

    class Runner(self.Runner):

        @property
        def executor(this):
            return self

        @property
        def command(self):
            return list(command)

        def run(this, stdout=None, stderr=None, stdin=None, cwd=None):
            nailgun = None
            try:
                nailgun = self._get_nailgun_client(jvm_options, classpath, stdout, stderr, stdin)
                logger.debug('Executing via {ng_desc}: {cmd}'.format(ng_desc=nailgun, cmd=this.cmd))
                return nailgun.execute(main, cwd, *args)
            except (NailgunClient.NailgunError, self.InitialNailgunConnectTimedOut) as e:
                self.terminate()
                raise self.Error('Problem launching via {ng_desc} command {main} {args}: {msg}'.format(ng_desc=(nailgun or '<no nailgun connection>'), main=main, args=' '.join(args), msg=e))
    return Runner()