Lines Matching refs:kind
33 t.append(command, kind)
34 where kind is a string of two characters: the first is '-' if the
42 t.prepend(command, kind)
113 def append(self, cmd, kind):
114 """t.append(cmd, kind) adds a new step at the end."""
117 if kind not in stepkinds:
118 raise ValueError('Template.append: bad kind %r' % (kind,))
119 if kind == SOURCE:
123 if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
125 if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
127 self.steps.append((cmd, kind))
129 def prepend(self, cmd, kind):
130 """t.prepend(cmd, kind) adds a new step at the front."""
133 if kind not in stepkinds:
134 raise ValueError('Template.prepend: bad kind %r' % (kind,))
135 if kind == SINK:
139 if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
141 if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
143 self.steps.insert(0, (cmd, kind))
186 # [input filename or '', command string, kind, output filename or '']
189 for cmd, kind in steps:
190 list.append(['', cmd, kind, ''])
199 [cmd, kind] = list[0][1:3]
200 if kind[0] == 'f' and not infile:
204 [cmd, kind] = list[-1][1:3]
205 if kind[1] == 'f' and not outfile:
222 [inf, cmd, kind, outf] = item
223 if kind[1] == 'f':
225 if kind[0] == 'f':
227 if kind[0] == '-' and inf:
229 if kind[1] == '-' and outf:
235 [cmd, kind] = item[1:3]
237 if 'f' in kind: