Lines Matching refs:self

12     def __init__(self, lines, path):  argument
13 self.reset(lines, path)
15 def __repr__(self): argument
20 " initrd: %s\n" %(self.title, self.root, self.kernel,
21 self.args, self.initrd))
22 def reset(self, lines, path): argument
23 self._initrd = self._kernel = self._readonly = None
24 self._args = ""
25 self.title = ""
26 self.lines = []
27 self.path = path
28 self.root = ""
30 self.set_from_line(line)
32 def set_from_line(self, line, replace = None): argument
35 if com in self.commands:
36 if self.commands[com] is not None:
37 setattr(self, self.commands[com], re.sub('^"(.+)"$', r"\1", arg.strip()))
45 self.lines.append(line)
47 self.lines.pop(replace)
48 self.lines.insert(replace, line)
50 def set_kernel(self, val): argument
51 self._kernel = (None, self.path + "/" + val)
52 def get_kernel(self): argument
53 return self._kernel
56 def set_initrd(self, val): argument
57 self._initrd = (None, self.path + "/" + val)
58 def get_initrd(self): argument
59 return self._initrd
62 def set_args(self, val): argument
63 self._args = val
64 def get_args(self): argument
65 args = self._args
66 if self.root:
67 args += " root=" + self.root
68 if self.readonly:
73 def set_readonly(self, val): argument
74 self._readonly = 1
75 def get_readonly(self): argument
76 return self._readonly
91 def __init__(self, fn = None): argument
92 self.filename = fn
93 self.images = []
94 self.timeout = -1
95 self._default = 0
98 self.parse()
100 def parse(self, buf = None): argument
102 if self.filename is None:
105 f = open(self.filename, 'r')
111 path = os.path.dirname(self.filename)
124 self.add_image(LiloImage(img, path))
133 if com in self.commands:
134 if self.commands[com] is not None:
135 setattr(self, self.commands[com], arg.strip())
142 self.add_image(LiloImage(img, path))
144 def hasPassword(self): argument
147 def hasPasswordAccess(self): argument
150 def add_image(self, image): argument
151 self.images.append(image)
153 def new_image(self, title, lines): argument
159 def _get_default(self): argument
160 for i in range(len(self.images)):
161 if self.images[i].title == self._default:
164 def _set_default(self, val): argument
165 self._default = val