labpack/platforms/docker.py
def command(self, sys_command):

        '''
            a method to run a system command in a separate shell

        :param sys_command: string with docker command
        :return: string output from docker
        '''

        title = '%s.command' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'sys_command': sys_command
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

        from subprocess import check_output, STDOUT, CalledProcessError
        try:
            output = check_output(sys_command, shell=True, stderr=STDOUT).decode('utf-8')
        except CalledProcessError as err:
            raise Exception(err.output.decode('ascii', 'ignore'))

        return output

            a method to run a system command in a separate shell

        :param sys_command: string with docker command
        :return: string output from docker
        
a method to run a system command in a separate shell
a method to run a system command in a separate shell
def command(self, sys_command):
        title = '%s.command' % self.__class__.__name__
        input_fields = {
            'sys_command': sys_command
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
        from subprocess import check_output, STDOUT, CalledProcessError
        try:
            output = check_output(sys_command, shell=True, stderr=STDOUT).decode('utf-8')
        except CalledProcessError as err:
            raise Exception(err.output.decode('ascii', 'ignore'))
        return output
def command ( self , sys_command ) : title = '%s.command' % self . __class__ . __name__ input_fields = { 'sys_command' : sys_command } for key , value in input_fields . items ( ) : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) from subprocess import check_output , STDOUT , CalledProcessError try : output = check_output ( sys_command , shell = True , stderr = STDOUT ) . decode ( 'utf-8' ) except CalledProcessError as err : raise Exception ( err . output . decode ( 'ascii' , 'ignore' ) ) return output
a method to run a system command in a separate shell
a method to run a system command in a separate shell
'''
            a method to run a system command in a separate shell

        :param sys_command: string with docker command
        :return: string output from docker
        ''' # validate inputs

string output from docker
string output from docker
self
sys_command
string with docker command
string with docker command