view Doc/includes/sqlite3/execute_2.py @ 51330:ca423008fa4a legacy-trunk

#5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path.
author Georg Brandl <georg@python.org>
date Thu, 05 Feb 2009 10:37:07 +0000
parents c62f6669ae22
children
line wrap: on
line source

import sqlite3

con = sqlite3.connect("mydb")

cur = con.cursor()

who = "Yeltsin"
age = 72

cur.execute("select name_last, age from people where name_last=:who and age=:age",
    {"who": who, "age": age})
print cur.fetchone()