commit | 8ec7f656134b1230ab23003a94ba3266d7064122 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Wed Aug 15 14:28:01 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Wed Aug 15 14:28:01 2007 +0000 |
tree | bc730d5fb3302dc375edd26b26f750d609b61d72 | |
parent | f56181ff53ba00b7bed3997a4dccd9a1b6217b57 [diff] [blame] |
Move the 2.6 reST doc tree in place.
diff --git a/Doc/includes/sqlite3/md5func.py b/Doc/includes/sqlite3/md5func.py new file mode 100644 index 0000000..5769687 --- /dev/null +++ b/Doc/includes/sqlite3/md5func.py
@@ -0,0 +1,11 @@ +import sqlite3 +import md5 + +def md5sum(t): + return md5.md5(t).hexdigest() + +con = sqlite3.connect(":memory:") +con.create_function("md5", 1, md5sum) +cur = con.cursor() +cur.execute("select md5(?)", ("foo",)) +print cur.fetchone()[0]