model-view-controller pattern seeing programs in this way helpssince you become better at asking questions about what happens at each step in the process sadlythis view is too general and leaves too much outand thus it is not completely helpful when it comes to the actual nuts and bolts development work stillit is useful tool to have this book is called practical python design patternsand not abstract programming modelsso let' get practical without completely discarding the idea of the three parts of programdifferent types of programs take different perspectives on the idea games execute game loopwhile web applications take user input and use that input together with some form of stored data to produce an output to be displayed in the user' browser window for the sake of this we are going to use command-line dummy program to demonstrate the ideas want you to internalize once you have clear grasp of the basic ideaswe will implement themusing couple of python libraries to build basic web application that can serve web pages from your local machine our first program will simply take name as an argument if the name is already storedit will welcome the visitor backotherwiseit will tell the visitor that it is nice to meet them import sys def main(name)trywith open('names dat'' 'as data_filenames [ for in data_file readlines()except filenotfounderror as ewith open('names dat'' 'as data_filedata_file write(namenames [if name in namesprint("welcome back {}!format(name)elseprint("hi {}it is good to meet youformat(name)with open('names dat'' 'as data_filedata_file write(name