( )ar ( )ileage ( )wner ( )ew car license hyr license hyr seats mileage ownerjack lemon ( )ar ( )ileage ( )wner ( )ew car license [ hyr]mileage [ ] mileage successfully changed ( )top server ( )uit [ ]( )top server ( )uit [ ] the data entered by the user is shown in bold--where there is no visible input it means that the user pressed enter to accept the default here the user has asked to see the details of particular car and then updated its mileage as many clients as we like can be runningand when user quits their particular client the server is unaffected but if the server is stoppedthe client it was stopped in will quit and all the other clients will get "connection refusederror and will terminate when they next attempt to access the server in more sophisticated applicationthe ability to stop the server would be available only to certain usersperhaps on only particular machinesbut we have included it in the client to show how it is done we will now review the codestarting with the main(function and the handling of the user interfaceand finishing with the networking code itself def main()if len(sys argv address[ sys argv[ call dict( =get_car_detailsm=change_mileageo=change_ownern=new_registrations=stop_serverq=quitmenu ("( )ar edit ( )ileage edit ( )wner ( )ew car "( )top server ( )uit"valid frozenset("cmonsq"previous_license none while trueaction console get_menu_choice(menuvalid" "trueprevious_license call[action](previous_licensebranching using dictionaries the address list is global that holds the ip address and port number as two-item list["localhost" ]with the ip address overridden if specified on the command line the call dictionary maps menu options to functions the console module is one supplied with this book and contains some useful functions for getting values from the user at the consolesuch as console get_string(and console get_integer()these are similar to functions