#NEWLINE# def download( self , src , dst , **kwargs ) : #NEWLINE# #INDENT# '\n        Downloads *src* from the other side to *dst* on the local side. By default, \n        ``-r`` (recursive copy) is given to ``scp``, so *src* can be either a file or \n        a directory. To override this behavior, pass ``r = False`` as a keyword argument.\n        \n        :param src: the source path (on the other side)\n        :param dst: the destination path (on the local side)\n        :param kwargs: any additional keyword arguments, passed to ``scp``.\n        ' #NEWLINE# ( cmdline , host ) = self . _process_scp_cmdline ( kwargs ) #NEWLINE# cmdline . append ( ( '%s:%s' % ( host , src ) ) ) #NEWLINE# cmdline . append ( dst ) #NEWLINE# proc = Popen ( cmdline , stdin = PIPE , stdout = PIPE , stderr = PIPE , shell = False , cwd = self . scp_cwd , env = self . scp_env , startupinfo = _get_startupinfo ( ) ) #NEWLINE# ( stdout , stderr ) = proc . communicate ( ) #NEWLINE# if ( proc . returncode != 0 ) : #NEWLINE# #INDENT# raise ValueError ( 'upload failed' , stdout , stderr )