test-drive these pagesthe only differences you'll find are the urls at the top of your browser (they're different filesafter all)extra blank lines in the generated html (ignored by the browser)and potentially different ordering of language names in the main page' pull-down selection list againthis selection list ordering difference arises because this version relies on the order of the python dictionary' keys listnot on hardcoded list in an html file dictionariesyou'll recallarbitrarily order entries for fast fetchesif you want the selection list to be more predictablesimply sort the keys list before iterating over it using the list sort method or the sorted function introduced in python for lang in sorted(hellos)mock {inputkeyfieldmockup(lang)dict iterator instead of keys(faking inputs with shell variables if you're familiar with shellsyou might also be able to test cgi scripts from the command line on some platforms by setting the same environment variables that http servers setand then launching your script for examplewe might be able to pretend to be web server by storing input parameters in the query_string environment variableusing the same syntax we employ at the end of url string after the ?setenv query_string "name=mel&job=trainer,+writerpython tutor py content-typetext/html tutor py greetings your name is mel you wear rather (unknownshoes your current jobtrainerwriter you program in (unknownyou also said(unknownherewe mimic the effects of get style form submission or explicit url http servers place the query string (parametersin the shell variable query_string python' cgi module finds them there as though they were sent by browser post-style inputs can be simulated with shell variables toobut it' more complex--so much so that you may be better off not bothering to learn how in factit may be more robust in general to mock up inputs with python objects ( as in formmockup pybut some cgi scripts may have additional environment or testing constraints that merit unique treatment more on html and url escapes perhaps the subtlest change in the last section' rewrite is thatfor robustnessthis version' reply script (example - also calls cgi escape for the language namenot more on html and url escapes