From a88b8c8c0f591a3bfa8d7984343a27815184f495 Mon Sep 17 00:00:00 2001 From: "Jeremy T. Bouse" Date: Sun, 29 May 2011 08:16:54 -0400 Subject: Imported Upstream version 1.7.7.1 --- docs/paramiko.win_pageant-pysrc.html | 51 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'docs/paramiko.win_pageant-pysrc.html') diff --git a/docs/paramiko.win_pageant-pysrc.html b/docs/paramiko.win_pageant-pysrc.html index 3ff1f48..f96c903 100644 --- a/docs/paramiko.win_pageant-pysrc.html +++ b/docs/paramiko.win_pageant-pysrc.html @@ -111,10 +111,9 @@ 55 try: 56 hwnd = win32gui.FindWindow('Pageant', 'Pageant') 57 return hwnd - 58 except win32gui.error: + 58 except win32gui.error: 59 pass - 60 elif _has_ctypes: + 60 elif _has_ctypes: 61 # Return 0 if there is no Pageant window. 62 return ctypes.windll.user32.FindWindowA('Pageant', 'Pageant') 63 return None @@ -127,7 +126,7 @@ paramiko.rng_win32.error" class="py-name" href="#" onclick="return doclink('link 70 This checks both if we have the required libraries (win32all or ctypes) 71 and if there is a Pageant currently running. 72 """ - 73 if (_has_win32all or _has_ctypes) and _get_pageant_window_object(): + 73 if (_has_win32all or _has_ctypes) and _get_pageant_window_object(): 74 return True 75 return False 76 @@ -142,45 +141,45 @@ paramiko.rng_win32.error" class="py-name" href="#" onclick="return doclink('link 85 filename = tempfile.mktemp('.pag') 86 map_filename = os.path.basename(filename) 87 - 88 f = open(filename, 'w+b') - 89 f.write(msg ) + 88 f = open(filename, 'w+b') + 89 f.write(msg ) 90 # Ensure the rest of the file is empty, otherwise pageant will read this - 91 f.write('\0' * (_AGENT_MAX_MSGLEN - len(msg))) + 91 f.write('\0' * (_AGENT_MAX_MSGLEN - len(msg))) 92 # Create the shared file map that pageant will use to read from - 93 pymap = mmap.mmap(f. 93 pymap = mmap.mmap(f.fileno(), _AGENT_MAX_MSGLEN, tagname=map_filename, access=mmap.ACCESS_WRITE) +paramiko.pipe.WindowsPipe.fileno" class="py-name" href="#" onclick="return doclink('link-15', 'fileno', 'link-15');">fileno(), _AGENT_MAX_MSGLEN, tagname=map_filename, access=mmap.ACCESS_WRITE) 94 try: 95 # Create an array buffer containing the mapped filename 96 char_buffer = array.array("c", map_filename + '\0') 97 char_buffer_address, char_buffer_size = char_buffer.buffer_info() 98 # Create a string to use for the SendMessage function call - 99 cds = struct.pack("LLP", _AGENT_COPYDATA_ID, char_buffer_size, char_buffer_address) + 99 cds = struct.pack("LLP", _AGENT_COPYDATA_ID, char_buffer_size, char_buffer_address) 100 -101 if _has_win32all: +101 if _has_win32all: 102 # win32gui.SendMessage should also allow the same pattern as 103 # ctypes, but let's keep it like this for now... -104 response = win32gui.SendMessage(hwnd, win32con_WM_COPYDATA, len(cds), cds) -105 elif _has_ctypes: +104 response = win32gui.SendMessage(hwnd, win32con_WM_COPYDATA, len(cds), cds) +105 elif _has_ctypes: 106 _buf = array.array('B', cds) 107 _addr, _size = _buf.buffer_info() -108 response = ctypes.windll.user32.SendMessageA(hwnd, win32con_WM_COPYDATA, _size, _addr) +108 response = ctypes.windll.user32.SendMessageA(hwnd, win32con_WM_COPYDATA, _size, _addr) 109 else: 110 response = 0 111 112 if response > 0: -113 datalen = pymap.113 datalen = pymap.read(4) +paramiko.buffered_pipe.BufferedPipe.read" class="py-name" href="#" onclick="return doclink('link-22', 'read', 'link-22');">read(4) 114 retlen = struct.unpack('>I', datalen)[0] -115 return datalen + pymap.115 return datalen + pymap.read(retlen) +paramiko.buffered_pipe.BufferedPipe.read" class="py-name" href="#" onclick="return doclink('link-23', 'read', 'link-22');">read(retlen) 116 return None 117 finally: -118 pymap.118 pymap.close() -119 f.close() +119 f.close() +paramiko.win_pageant.PageantConnection.close" class="py-name" href="#" onclick="return doclink('link-25', 'close', 'link-24');">close() 120 # Remove the file, it was temporary only -121 os.unlink(filename) +121 os.unlink(filename) 122 123
124 -class PageantConnection (object): @@ -266,7 +265,7 @@ expandto(location.href);