| 410 | self.progressBar.setProgressFraction(fractionDone, fillColor) |
| 411 | |
| 412 | def showSelectedError(self): |
| 413 | selection = self.errorListbox.curselection() |
| 414 | if not selection: return |
| 415 | selected = int(selection[0]) |
| 416 | txt = self.errorListbox.get(selected) |
| 417 | window = tk.Toplevel(self.root) |
| 418 | window.title(txt) |
| 419 | window.protocol('WM_DELETE_WINDOW', window.quit) |
| 420 | test, error = self.errorInfo[selected] |
| 421 | tk.Label(window, text=str(test), |
| 422 | foreground="red", justify=tk.LEFT).pack(anchor=tk.W) |
| 423 | tracebackLines = traceback.format_exception(*error) |
| 424 | tracebackText = "".join(tracebackLines) |
| 425 | tk.Label(window, text=tracebackText, justify=tk.LEFT).pack() |
| 426 | tk.Button(window, text="Close", |
| 427 | command=window.quit).pack(side=tk.BOTTOM) |
| 428 | window.bind('<Key-Return>', lambda e, w=window: w.quit()) |
| 429 | window.mainloop() |
| 430 | window.destroy() |
| 431 | |
| 432 | |
| 433 | class ProgressBar(tk.Frame): |