la mia mail è mithrandirit@yahoo.it
e anche io sarei + ke felice di mandare avanti il project di richland
codice:
Agend.py
import dbhash
def AggNome(DB_NeC,DBTel,DBVia):
print "Inserire un nuovo nome..."
Nome= raw_input()
print "Inserire il cognome..."
Cognome=raw_input()
DB_NeC[Cognome]=Nome
print "Inserire il numero di telefono..."
Tel=raw_input()
DBTel[Cognome]=Tel
print "Inserire Via e numero civico..."
Via=raw_input()
DBVia[Cognome]=Via
def PrintLista(DB_NeC,DBTel,DBVia):
for key in DB_NeC.keys():
print key, DB_NeC[key], DBTel[key], DBVia[key]
if (__name__=="__main__"):
DB_NeC=dbhash.open("NomieCognomi","c")
DBTel=dbhash.open("Tel","c")
DBVia=dbhash.open("Via","c")
while (1):
print "Digitare un cognome per eliminarlo dall'agenda\n+ per aggiungere un nuovo profilo\nLista per la lista completa\nQ per uscire"
Command=raw_input()
if (Command==""):
continue
elif (Command=="+"):
AggNome(DB_NeC,DBTel,DBVia)
elif (Command=="Lista"):
print ""
PrintLista(DB_NeC,DBTel,DBVia)
print ""
elif (Command=="Q"):
break
else:
try:
print DB_NeC[Command]
print DBTel[Command]
print DBVia[Command]
print "profilo eliminato."
del DB_NeC[Command]
del DBTel[Command]
del DBVia[Command]
except:
print "Profilo non trovato"
print "Salvo e chiudo"
DB_NeC.close()
DBTel.close()
DBVia.close()
piccola prova, ero troppo curioso. TNX Dark Bard! :tongue: