Home | History | Annotate | Download | only in python2.7

Lines Matching refs:cmd

108     def append(self, cmd, kind):
109 """t.append(cmd, kind) adds a new step at the end."""
110 if type(cmd) is not type(''):
112 'Template.append: cmd must be a string'
122 if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
124 'Template.append: missing $IN in cmd'
125 if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
127 'Template.append: missing $OUT in cmd'
128 self.steps.append((cmd, kind))
130 def prepend(self, cmd, kind):
131 """t.prepend(cmd, kind) adds a new step at the front."""
132 if type(cmd) is not type(''):
134 'Template.prepend: cmd must be a string'
144 if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
146 'Template.prepend: missing $IN in cmd'
147 if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
149 'Template.prepend: missing $OUT in cmd'
150 self.steps.insert(0, (cmd, kind))
170 cmd = self.makepipeline(file, '')
171 return os.popen(cmd, 'r')
179 cmd = self.makepipeline('', file)
180 return os.popen(cmd, 'w')
186 cmd = makepipeline(infile, self.steps, outfile)
188 print cmd
189 cmd = 'set -x; ' + cmd
190 return cmd
198 for cmd, kind in steps:
199 list.append(['', cmd, kind, ''])
208 [cmd, kind] = list[0][1:3]
213 [cmd, kind] = list[-1][1:3]
231 [inf, cmd, kind, outf] = item
233 cmd = 'OUT=' + quote(outf) + '; ' + cmd
235 cmd = 'IN=' + quote(inf) + '; ' + cmd
237 cmd = cmd + ' <' + quote(inf)
239 cmd = cmd + ' >' + quote(outf)
240 item[1] = cmd
244 [cmd, kind] = item[1:3]
247 cmd = '{ ' + cmd + '; }'
248 cmdlist = cmdlist + ' |\n' + cmd
250 cmdlist = cmdlist + '\n' + cmd