mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 12:23:42 +03:00
9de46e416e
Forward compatible with newer Pythons.
9 lines
156 B
Python
9 lines
156 B
Python
import gtk
|
|
import psycopg2
|
|
|
|
o = psycopg2.connect("dbname=test")
|
|
c = o.cursor()
|
|
c.execute("SELECT 1.23::float AS foo")
|
|
x = c.fetchone()[0]
|
|
print(x, type(x))
|