Lines Matching refs:self
75 def __init__(self, lines): argument
76 self.lines = [s.strip() for s in lines]
78 def to_dict(self): argument
80 for line in self.lines:
88 def get(self, name): argument
90 for line in self.lines:
95 def put(self, name, value): argument
97 for i in range(0,len(self.lines)):
98 if self.lines[i].startswith(key):
99 self.lines[i] = key + value
101 self.lines.append(key + value)
103 def delete(self, name): argument
105 self.lines = [ line for line in self.lines if not line.startswith(key) ]
107 def write(self, f): argument
108 f.write("\n".join(self.lines))