summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2020-05-27 22:25:15 +1200
committerGitHub <noreply@github.com>2020-05-27 22:25:15 +1200
commita9b814cb53e47f82a51db6ce0b82bcdaa655e581 (patch)
treea6d1d8b861bfcffb6340861cf48db7a2c3c02e05
parent14355e9c69eacd38eafc1b24538c316529fe57e2 (diff)
parentac488acee3eda7e5acf71d3cbec38780f5887bf5 (diff)
downloadpsycopg2-a9b814cb53e47f82a51db6ce0b82bcdaa655e581.tar.gz
Merge pull request #1110 from UpGado/patch-1
Fix ctypes doc example AttributeError
-rw-r--r--doc/src/connection.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/src/connection.rst b/doc/src/connection.rst
index 0c6e3c5..ce69b59 100644
--- a/doc/src/connection.rst
+++ b/doc/src/connection.rst
@@ -724,6 +724,7 @@ The ``connection`` class
raw connection structure to C functions, e.g. via `ctypes`::
>>> import ctypes
+ >>> import ctypes.util
>>> libpq = ctypes.pydll.LoadLibrary(ctypes.util.find_library('pq'))
>>> libpq.PQserverVersion.argtypes = [ctypes.c_void_p]
>>> libpq.PQserverVersion.restype = ctypes.c_int