Ñò HácJc @ sÑ d Z d d k l Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Td d k l Z d d k l Z d d k l Z d „ Z d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s Client-mode SFTP support. iÿÿÿÿ( t hexlifyN( t *( t SFTPAttributes( t SSHException( t SFTPFilec C sS y | i d ƒ SWn; t j o/ y | i d ƒ SWqO t j o | SXn Xd S( sÑ decode a string as ascii or utf8 if possible (as required by the sftp protocol). if neither works, just return a byte string because the server probably doesn't know the filename's encoding. t asciis utf-8N( t encodet UnicodeErrort decode( t s( ( s8 /usr/lib/python2.6/site-packages/paramiko/sftp_client.pyt _to_unicode% s t SFTPClientc B sU e Z d Z d „ Z d „ Z e e ƒ Z d „ Z d „ Z d „ Z d d „ Z d d „ Z d d d „ Z e Z d „ Z e Z d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d$ d „ Z d$ d „ Z d „ Z d „ Z! d$ d „ Z" d! „ Z# d" „ Z$ d# „ Z% RS(% s SFTP client object. C{SFTPClient} is used to open an sftp session across an open ssh L{Transport} and do remote file operations. c C sì t i | ƒ | | _ t | _ d | _ t i ƒ | _ d | _ t i ƒ | _ t | ƒ t j o> | i i ƒ } t i | i ƒ d ƒ | _ | i ƒ | _ n y | i ƒ } Wn! t j o } t d ƒ ‚ n X| i t d | ƒ d S( s± 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} @raise SSHException: if there's an exception while negotiating sftp i s .sftps EOF during negotiations* Opened sftp connection (server version %d)N( t BaseSFTPt __init__t sockt Falset ultra_debugt request_numbert threadingt Lockt _lockt Nonet _cwdt weakreft WeakValueDictionaryt _expectingt typet Channelt get_transportt utilt get_loggert get_log_channelt loggert get_hexdumpt _send_versiont EOFErrorR t _logt INFO( t selfR t transportt server_versiont x( ( s8 /usr/lib/python2.6/site-packages/paramiko/sftp_client.pyR : s c C s5 | i ƒ } | d j o d S| i d ƒ | | ƒ S( sB Create an SFTP client channel from an open L{Transport}. @param t: an open L{Transport} which is already authenticated @type t: L{Transport} @return: a new L{SFTPClient} object, referring to an sftp session (channel) across the transport @rtype: L{SFTPClient} t sftpN( t open_sessionR t invoke_subsystem( t clst tt chan( ( s8 /usr/lib/python2.6/site-packages/paramiko/sftp_client.pyt from_transport\ s c G s• t | t ƒ oK x~ | D]<