functions here to allow them to be used for other record types in the future code at the bottom of the file would similarly become function with passed-in shelve filenameand we would also need to pass in new record construction call to the update function because person could not be hardcoded such generalization is beyond the scope of this previewbut it makes for nice exercise if you are so inclined lateri'll also point you to suggested reading example in the book examples packagepyformwhich takes different approach to generalized form construction to make this gui more user friendlyit might also be nice to add an index window that displays all the keys in the database in order to make browsing easier some sort of verification before updates might be useful as welland delete and clear buttons would be simple to code furthermoreassuming that inputs are python code may be more bother than it is wortha simpler input scheme might be easier and safer ( won' officially say these are suggested exercises toobut it sounds like they could be we could also support window resizing (as we'll learnwidgets can grow and shrink with the windowand provide an interface for calling methods available on stored instancesclasses too (as isthe pay field can be updatedbut there is no way to invoke the giveraise methodif we plan to distribute this gui widelywe might package it up as standalone executable program-- frozen binary in python terminology--using third-party tools such as py exepyinstallerand others (search the web for pointerssuch program can be run directly without installing python on the receiving endbecause the python bytecode interpreter is included in the executable itself 'll leave all such extensions as points to ponderand revisit some of them later in this book before we move ontwo notes firsti should mention that even more graphical packages are available to python programmers for instanceif you need to do graphics beyond basic windowsthe tkinter canvas widget supports freeform graphics thirdparty extensions such as blenderopenglvpythonpilvtkmayaand pygame provide even more advanced graphicsvisualizationand animation tools for use with python scripts moreoverthe pmwtixand ttk widget kits mentioned earlier extend tkinter itself see python' library manual for tix and ttkand try the pypi site or web search for third-party graphics extensions and in deference to fans of other gui toolkits such as wxpython and pyqti should also note that there are other gui options to choose from and that choice is sometimes very subjective tkinter is shown here because it is maturerobustfully open sourcewell documentedwell supportedlightweightand standard part of python by most accountsit remains the standard for building portable guis in python sneak preview