Newer
Older
invertedlogic / LGN-IP3870 / qtpyui / sql-test / testsql.py
@John Ryland John Ryland on 19 Jan 2009 362 bytes LG project files
import phonedbsql
import sys
# -*- encoding: UTF-8 -*-


print 'loading db'
pb = phonedbsql.phonedb
print 'loaded db'
if len(sys.argv) > 1:
    print 'searching db for ' + sys.argv[1]
    list = pb.get_phonelist_by_text(sys.argv[1])
    if list:
        for item in list:
            print item
print 'searched db'
print 'saving db'
pb.save()
print 'saved db'