~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to Code_python/DocServer/create_doc_database.py

  • Committer: Dave Kuhlman
  • Date: 2015-10-03 18:25:17 UTC
  • mfrom: (35.1.5 Materials)
  • Revision ID: dkuhlman@davekuhlman.org-20151003182517-b2m7eltjdapw46zh
Review for Cisco.  Merged checkpoint 10

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
 
3
3
"""
4
 
Create a relational database and a table in it.
5
 
Add some records.
6
 
Read and display the records.
 
4
synopsis:
 
5
    Create a relational database to hold documents.
 
6
    Create tables "config" and "documents".
 
7
    Initialize the "latest_id" in "config" to 0.
 
8
usage:
 
9
    python create_doc_database.py <db_file_name.sqlite>
7
10
"""
8
11
 
9
12
import sys