labpack/platforms/docker.py
def enter(self, container_alias):

        '''
            a method to open up a terminal inside a running container

        :param container_alias: string with name or id of container 
        :return: None
        '''
        
        title = '%s.enter' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'container_alias': container_alias
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # compose system command
        from os import system
        sys_cmd = 'docker exec -it %s sh' % container_alias
        if self.localhost.os.sysname in ('Windows'):
            sys_cmd = 'winpty %s' % sys_cmd

    # open up terminal
        system(sys_cmd)

            a method to open up a terminal inside a running container

        :param container_alias: string with name or id of container 
        :return: None
        
a method to open up a terminal inside a running container
a method to open up a terminal inside a running container
def enter(self, container_alias):
        title = '%s.enter' % self.__class__.__name__
        input_fields = {
            'container_alias': container_alias
        }
        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 os import system
        sys_cmd = 'docker exec -it %s sh' % container_alias
        if self.localhost.os.sysname in ('Windows'):
            sys_cmd = 'winpty %s' % sys_cmd
        system(sys_cmd)
def enter ( self , container_alias ) : title = '%s.enter' % self . __class__ . __name__ input_fields = { 'container_alias' : container_alias } 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 os import system sys_cmd = 'docker exec -it %s sh' % container_alias if self . localhost . os . sysname in ( 'Windows' ) : sys_cmd = 'winpty %s' % sys_cmd system ( sys_cmd )
a method to open up a terminal inside a running container
a method to open up a terminal inside a running container
'''
            a method to open up a terminal inside a running container

        :param container_alias: string with name or id of container 
        :return: None
        ''' # validate inputs
 # compose system command
 # open up terminal

None
self
container_alias
string with name or id of container
string with name or id of container