add2db.py
author viric@llimona
Thu, 18 May 2006 23:06:22 +0200
changeset 1 d89c6e7de299
parent 0 6371497b4e53
permissions -rwxr-xr-x
File found in working directory. Probably not finished.
#!/usr/bin/python
# -*- coding: utf-8 -*-


import sys,shelve

dbase = shelve.open('vortoj-ru-ca.sdb')

print "Showing keys:"
for a in dbase.keys():
	print a

print("Tajpu vorton por aldoni al la listo:"),
key = raw_input()

if key == "":
	print "Fino."
	sys.exit()

print("Tajpu tradukon por %s:" % key),
traduko = raw_input()

dbase[key] = traduko

print "Showing new keys:"
for a in dbase.keys():
	print a
dbase.close()