~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to examples/dt.py

  • Committer: Federico Di Gregorio
  • Date: 2005-06-13 06:25:06 UTC
  • Revision ID: fog-fffb514a007294079bbec1acfbc081157345f9a7
psycopg->psycopg2 switch in the examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
## don't modify anything below tis line (except for experimenting)
20
20
 
21
 
import sys, psycopg
 
21
import sys, psycopg2
22
22
import mx.DateTime
23
23
import datetime
24
24
 
26
26
    DSN = sys.argv[1]
27
27
 
28
28
print "Opening connection using dns:", DSN
29
 
conn = psycopg.connect(DSN)
 
29
conn = psycopg2.connect(DSN)
30
30
curs = conn.cursor()
31
31
 
32
32
try: