def __init__(self, userhome=".", envs={}, script_dir="./.scripts", **kwargs):
        ''' Initialize the local channel. script_dir is required by set to a default.

        KwArgs:
            - userhome (string): (default='.') This is provided as a way to override and set a specific userhome
            - envs (dict) : A dictionary of env variables to be set when launching the shell
            - script_dir (string): (default="./.scripts") Directory to place scripts
        '''
        self.userhome = os.path.abspath(userhome)
        self.hostname = "localhost"
        self.envs = envs
        local_env = os.environ.copy()
        self._envs = copy.deepcopy(local_env)
        self._envs.update(envs)
        self._script_dir = os.path.abspath(script_dir)
        try:
            os.makedirs(self._script_dir)
        except OSError as e:
            if e.errno != errno.EEXIST:
                logger.error("Failed to create script_dir : {0}".format(script_dir))
                raise BadScriptPath(e, self.hostname)
def __init__ ( self , userhome = "." , envs = { } , script_dir = "./.scripts" , ** kwargs ) : self . userhome = os . path . abspath ( userhome ) self . hostname = "localhost" self . envs = envs local_env = os . environ . copy ( ) self . _envs = copy . deepcopy ( local_env ) self . _envs . update ( envs ) self . _script_dir = os . path . abspath ( script_dir ) try : os . makedirs ( self . _script_dir ) except OSError as e : if e . errno != errno . EEXIST : logger . error ( "Failed to create script_dir : {0}" . format ( script_dir ) ) raise BadScriptPath ( e , self . hostname )
Initialize the local channel. script_dir is required by set to a default.

        KwArgs:
            - userhome (string): (default='.') This is provided as a way to override and set a specific userhome
            - envs (dict) : A dictionary of env variables to be set when launching the shell
            - script_dir (string): (default="./.scripts") Directory to place scripts