Logo Search packages:      
Sourcecode: paramiko version File versions  Download package

def paramiko::sftp_client::SFTPClient::__init__ (   self,
  sock 
)

Create an SFTP client from an existing L{Channel}.  The channel
should already have requested the C{"sftp"} subsystem.

An alternate way to create an SFTP client context is by using
L{from_transport}.

@param sock: an open L{Channel} using the C{"sftp"} subsystem.
@type sock: L{Channel}

Definition at line 46 of file sftp_client.py.

00046                             :
        """
        Create an SFTP client from an existing L{Channel}.  The channel
        should already have requested the C{"sftp"} subsystem.

        An alternate way to create an SFTP client context is by using
        L{from_transport}.

        @param sock: an open L{Channel} using the C{"sftp"} subsystem.
        @type sock: L{Channel}
        """
        BaseSFTP.__init__(self)
        self.sock = sock
        self.ultra_debug = False
        self.request_number = 1
        # lock for request_number
        self._lock = threading.Lock()
        self._cwd = None
        # request # -> SFTPFile
        self._expecting = weakref.WeakValueDictionary()
        if type(sock) is Channel:
            # override default logger
            transport = self.sock.get_transport()
            self.logger = util.get_logger(transport.get_log_channel() + '.' +
                                          self.sock.get_name() + '.sftp')
            self.ultra_debug = transport.get_hexdump()
        self._send_version()
    
    def __del__(self):


Generated by  Doxygen 1.6.0   Back to index