comparison python/ide.py @ 289:bd2593de3ff8

Semifix burn2
author Windel Bouwman
date Thu, 21 Nov 2013 15:46:50 +0100
parents a747a45dcd78
children
comparison
equal deleted inserted replaced
288:a747a45dcd78 289:bd2593de3ff8
288 def buildFile(self): 288 def buildFile(self):
289 ce = self.activeMdiChild() 289 ce = self.activeMdiChild()
290 if not ce: 290 if not ce:
291 return 291 return
292 fn = ce.FileName 292 fn = ce.FileName
293 wd = os.path.dirname(fn)
294 self.diag.clear() 293 self.diag.clear()
295 outs = outstream.TextOutputStream() 294 outs = outstream.TextOutputStream()
296 if not zcc.zcc([io.StringIO(ce.Source)], [], outs, self.diag): 295 if not zcc.zcc([io.StringIO(ce.Source)], [], outs, self.diag):
297 # Set errors: 296 # Set errors:
298 self.builderrors.setErrorList(self.diag.diags) 297 self.builderrors.setErrorList(self.diag.diags)
302 def buildFileAndFlash(self): 301 def buildFileAndFlash(self):
303 ce = self.activeMdiChild() 302 ce = self.activeMdiChild()
304 if not ce: 303 if not ce:
305 return 304 return
306 fn = ce.FileName 305 fn = ce.FileName
307 wd = os.path.dirname(fn)
308 self.diag.clear() 306 self.diag.clear()
309 outs = outstream.TextOutputStream() 307 outs = outstream.TextOutputStream()
310 if not zcc.zcc([io.StringIO(ce.Source)], [], outs, self.diag): 308 imps = [open(ce.FileName, 'r') for ce in self.allChildren() if ce.FileName and ce.FileName != fn]
309 if not zcc.zcc([open(fn, 'r')], imps, outs, self.diag):
311 # Set errors: 310 # Set errors:
312 self.builderrors.setErrorList(self.diag.diags) 311 self.builderrors.setErrorList(self.diag.diags)
313 ce.setErrors(self.diag.diags) 312 ce.setErrors(self.diag.diags)
314 return 313 return
315 314