Help on module RepList: NAME RepList FILE ~\replist.py DESCRIPTION RepList.py (C)2008 Don A. Hanlen I make no claims, and take no reponsibility, for use or abuse of this code! I require those who DO use it to cite its source! If this code is used for commercial purposes I expect a (negotiable) cut! This file is rsponsible for maintaining reputation info for rePYbot(c). Adjunct files: rbos.py repDict = {} ## reputation dictionary ## entry = ['NaMe': [int:reputation, ## ['complainers', etc], ## ['vouchers', etc], ## ['complaints', etc], ## [int:compNNs, etc], ## ['vouches', etc], ## [int:vouchNNs, etc]]] CLASSES RepList class RepList | maintain reputation list | | Methods defined here: | | __init__(self, filename) | fname is sans extension | | dRep(self, name) | return name's reputation | | dumprepDict(self) | back up and save reputation dictionary to a file .bck, not .back | | getrepDict(self, fileName) | read reputation data from file | make a .back first, in case the .bck file ops screw up | | hasTouched(self, name1, name2) | True if vouch/complaint BY name2 ABOUT name1 else False | | insertPos(self, lName, lList) | return int:p = alphabetical insert position in a list. | | repComplain(self, xs, dump=True) | ['complainer', 'complainee', int:weight], refreshDict | return "Complaint registered." | | repList(self, asker, user, ftell) | output a reputation list using exterior function ftell | | repVouch(self, xs, dump=True) | ['voucher', 'vouchee', int:weight], refrestDict | return "Voucher registered." | | repWithdraw(self, xs, dump=True) | ['withdrawer', 'withdrawee'] | return "Vouch withdrawn." | | "You have no vouches or complaints for %s" % xs[1] DATA False = False True = True