Mercurial > lcfOS
comparison python/ide.py @ 288:a747a45dcd78
Various styling work
author | Windel Bouwman |
---|---|
date | Thu, 21 Nov 2013 14:26:13 +0100 |
parents | 1c7c1e619be8 |
children | bd2593de3ff8 |
comparison
equal
deleted
inserted
replaced
287:1c7c1e619be8 | 288:a747a45dcd78 |
---|---|
2 | 2 |
3 import sys | 3 import sys |
4 import os | 4 import os |
5 import logging | 5 import logging |
6 import traceback | 6 import traceback |
7 import io | |
7 | 8 |
8 from PyQt4.QtCore import * | 9 from PyQt4.QtCore import * |
9 from PyQt4.QtGui import * | 10 from PyQt4.QtGui import * |
10 | 11 |
11 # Compiler imports: | 12 # Compiler imports: |
290 return | 291 return |
291 fn = ce.FileName | 292 fn = ce.FileName |
292 wd = os.path.dirname(fn) | 293 wd = os.path.dirname(fn) |
293 self.diag.clear() | 294 self.diag.clear() |
294 outs = outstream.TextOutputStream() | 295 outs = outstream.TextOutputStream() |
295 if not zcc.zcc(ce.Source, outs, self.diag, pack_dir=wd): | 296 if not zcc.zcc([io.StringIO(ce.Source)], [], outs, self.diag): |
296 # Set errors: | 297 # Set errors: |
297 self.builderrors.setErrorList(self.diag.diags) | 298 self.builderrors.setErrorList(self.diag.diags) |
298 ce.setErrors(self.diag.diags) | 299 ce.setErrors(self.diag.diags) |
299 return | 300 return |
300 | 301 |
304 return | 305 return |
305 fn = ce.FileName | 306 fn = ce.FileName |
306 wd = os.path.dirname(fn) | 307 wd = os.path.dirname(fn) |
307 self.diag.clear() | 308 self.diag.clear() |
308 outs = outstream.TextOutputStream() | 309 outs = outstream.TextOutputStream() |
309 if not zcc.zcc(ce.Source, outs, self.diag, do_optimize=True): | 310 if not zcc.zcc([io.StringIO(ce.Source)], [], outs, self.diag): |
310 # Set errors: | 311 # Set errors: |
311 self.builderrors.setErrorList(self.diag.diags) | 312 self.builderrors.setErrorList(self.diag.diags) |
312 ce.setErrors(self.diag.diags) | 313 ce.setErrors(self.diag.diags) |
313 return | 314 return |
314 | 315 |
334 app = QApplication(sys.argv) | 335 app = QApplication(sys.argv) |
335 ide = Ide() | 336 ide = Ide() |
336 ide.show() | 337 ide.show() |
337 ide.logger.info('IDE started') | 338 ide.logger.info('IDE started') |
338 app.exec_() | 339 app.exec_() |
339 |