mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-31 15:57:31 +03:00 
			
		
		
		
	Fix ctypes example AttributeError
This commit is contained in:
		
							parent
							
								
									14355e9c69
								
							
						
					
					
						commit
						ac488acee3
					
				|  | @ -724,6 +724,7 @@ The ``connection`` class | ||||||
|         raw connection structure to C functions, e.g. via `ctypes`:: |         raw connection structure to C functions, e.g. via `ctypes`:: | ||||||
| 
 | 
 | ||||||
|             >>> import ctypes |             >>> import ctypes | ||||||
|  |             >>> import ctypes.util | ||||||
|             >>> libpq = ctypes.pydll.LoadLibrary(ctypes.util.find_library('pq')) |             >>> libpq = ctypes.pydll.LoadLibrary(ctypes.util.find_library('pq')) | ||||||
|             >>> libpq.PQserverVersion.argtypes = [ctypes.c_void_p] |             >>> libpq.PQserverVersion.argtypes = [ctypes.c_void_p] | ||||||
|             >>> libpq.PQserverVersion.restype = ctypes.c_int |             >>> libpq.PQserverVersion.restype = ctypes.c_int | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user