diff options
author | Dio Gado <diogado1@gmail.com> | 2020-05-27 05:39:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 05:39:53 -0400 |
commit | ac488acee3eda7e5acf71d3cbec38780f5887bf5 (patch) | |
tree | a6d1d8b861bfcffb6340861cf48db7a2c3c02e05 | |
parent | 14355e9c69eacd38eafc1b24538c316529fe57e2 (diff) | |
download | psycopg2-ac488acee3eda7e5acf71d3cbec38780f5887bf5.tar.gz |
Fix ctypes example AttributeError
-rw-r--r-- | doc/src/connection.rst | 1 |
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 |