summaryrefslogtreecommitdiff
path: root/doc/includes/sqlite3/createdb.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-05-30 04:35:35 +0900
committerKali Kaneko <kali@leap.se>2013-05-30 04:35:35 +0900
commit51032d827b297e4ea0cd529d57d73cd44e0c3905 (patch)
treecc69775b399af33479bcf1e3a7dbaa68b932b8b0 /doc/includes/sqlite3/createdb.py
parent06d9e5e7714562b10c48a0482dec2acd4abee55a (diff)
cleanup docs
Diffstat (limited to 'doc/includes/sqlite3/createdb.py')
-rw-r--r--doc/includes/sqlite3/createdb.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/doc/includes/sqlite3/createdb.py b/doc/includes/sqlite3/createdb.py
deleted file mode 100644
index 28e9514..0000000
--- a/doc/includes/sqlite3/createdb.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Not referenced from the documentation, but builds the database file the other
-# code snippets expect.
-
-from pysqlite2 import dbapi2 as sqlite3
-import os
-
-DB_FILE = "mydb"
-
-if os.path.exists(DB_FILE):
- os.remove(DB_FILE)
-
-con = sqlite3.connect(DB_FILE)
-cur = con.cursor()
-cur.execute("""
- create table people
- (
- name_last varchar(20),
- age integer
- )
- """)
-
-cur.execute("insert into people (name_last, age) values ('Yeltsin', 72)")
-cur.execute("insert into people (name_last, age) values ('Putin', 51)")
-
-con.commit()
-
-cur.close()
-con.close()