could achieve much the same effect as the traditional format expression used by this scriptand it provides specific syntax for referencing object attributes which to some might seem more explicit than using __dict__ keysd {'say' 'get''shrubbery''%(say) =%(get)sd ' =shrubbery'{say={get}format(** ' =shrubberyexpressionkey reference methodkey reference from person import person bob person('bob' '%(name) %(age)sbob __dict__ 'bob '{ name={ age}format(bob'bob = expression__dict__ keys methodattribute syntax because we need to escape attribute values firstthoughthe format method call' attribute syntax can' be used directly this waythe choice is really between both technique' key reference syntax above (at this writingit' not clear which formatting technique may come to dominateso we take liberties with using either in this bookif one replaces the other altogether somedayyou'll want to go with the winner in the interest of securityi also need to remind you one last time that the eval call used in this script to convert inputs to python objects is powerfulbut not secure--it happily runs any python codewhich can perform any system modifications that the script' process has permission to make if you careyou'll need to trust the input sourcerun in restricted environmentor use more focused input converters like int and float this is generally larger concern in the web worldwhere request strings might arrive from arbitrary sources since we're all friends herethoughwe'll ignore the threat using the website despite the extra complexities of serversdirectoriesand stringsusing the web interface is as simple as using the guiand it has the added advantage of running on any machine with browser and web connection to fetch recordfill in the key field and click fetchthe script populates the page with field data grabbed from the corresponding class instance in the shelveas illustrated in figure - for key bob figure - shows what happens when the key comes from the posted form as usualyou can also invoke the cgi script by instead passing inputs on query string at the end of the urlfigure - shows the reply we get when accessing url of the following form sneak preview