~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to examples/tz.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:
19
19
 
20
20
## don't modify anything below this line (except for experimenting)
21
21
 
22
 
import sys, psycopg
 
22
import sys
 
23
import psycopg2
23
24
import datetime
24
25
 
25
 
from psycopg.tz import ZERO, LOCAL, FixedOffsetTimezone
 
26
from psycopg2.tz import ZERO, LOCAL, FixedOffsetTimezone
26
27
 
27
28
if len(sys.argv) > 1:
28
29
    DSN = sys.argv[1]
29
30
 
30
31
print "Opening connection using dns:", DSN
31
 
conn = psycopg.connect(DSN)
 
32
conn = psycopg2.connect(DSN)
32
33
curs = conn.cursor()
33
34
 
34
35
try: