Example #1
0
 def deep_search(self, search):
     search_dict = self.database
     search_term = search.upper()
     prob, similar = similar_keys(search_term, search_dict.iterkeys())
     i, choice = navigate(similar, message='Here are similar terms that exist in the database:')
     if not choice: pass
     else:
         print '\n\tSearching for: "%s"...' % choice 
         self.database_fxn(choice)
Example #2
0
 def change_database(self):
     i, choice = navigate((it.upper() for it in self.items), message='Change database to: ')
     attr = choice.lower()
     self.database_fxn = getattr(self, 'act_'+attr)
     self.database = getattr(self, attr)