if input('delete?'in [' '' ']print('deleting'server dele(msgnumelseprint('skipping'finallyserver quit(input('bye 'get whole msg delete on srvr make sure we unlock mbox keep window up on windows cgi server-side script to interact with web browser #!/usr/bin/python import cgi form cgi fieldstorage(parse form data print("content-typetext/html\ "hdr plus blank line print(""print("reply page"html reply page print(""if not 'userin formprint("who are you?"elseprint("hello % !cgi escape(form['user'value)print(""database script to populate shelve with python objects see also shelve and pickle examples rec {'name'{'first''bob''last''smith'}'job'['dev''mgr']'age' rec {'name'{'first''sue''last''jones'}'job'['mgr']'age' import shelve db shelve open('dbfile'db['bob'rec db['sue'rec db close(database script to print and update shelve created in prior script import shelve db shelve open('dbfile'for key in dbprint(key'=>'db[key]bob db['bob'bob['age'+ appendix dsolutions to end-of-part exercises