diff options
| author | Federico Di Gregorio <fog@initd.org> | 2005-06-13 06:25:06 +0000 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2005-06-13 06:25:06 +0000 |
| commit | 9c284f457042cad50beb5730ac7f8c4a36eacae2 (patch) | |
| tree | 7edea4fb77fc0986e89d408ed37085e60a357691 /examples/dict.py | |
| parent | 0c56bc95df1cb34343e1866cf2a671c61076cb81 (diff) | |
| download | psycopg2-9c284f457042cad50beb5730ac7f8c4a36eacae2.tar.gz | |
psycopg->psycopg2 switch in the examples.
Diffstat (limited to 'examples/dict.py')
| -rw-r--r-- | examples/dict.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/dict.py b/examples/dict.py index 37fb071..37dc74a 100644 --- a/examples/dict.py +++ b/examples/dict.py @@ -19,18 +19,18 @@ DSN = 'dbname=test' ## don't modify anything below this line (except for experimenting) import sys -import psycopg -import psycopg.extras +import psycopg2 +import psycopg2.extras if len(sys.argv) > 1: DSN = sys.argv[1] print "Opening connection using dsn:", DSN -conn = psycopg.connect(DSN) +conn = psycopg2.connect(DSN) print "Encoding for this connection is", conn.encoding -curs = conn.cursor(cursor_factory=psycopg.extras.DictCursor) +curs = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) curs.execute("SELECT 1 AS foo, 'cip' AS bar, date(now()) as zot") data = curs.fetchone() |
