View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000311 | FreeCAD | Feature | public | 2011-03-16 20:02 | 2011-04-15 06:43 |
| Reporter | yorik | Assigned To | yorik | ||
| Priority | normal | Severity | minor | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Target Version | 0.12 | Fixed in Version | 0.12 | ||
| Summary | 0000311: add a button to the Report View to switch on/off the redirection of python errors | ||||
| Description | add a button to the Report View to switch on/off the redirection of python errors | ||||
| Additional Information | involves setting up a new titleBarWidget with a custom button. | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
When running a script from within the editor all Python messages (errors, print statements and more) are automatically redirected to the report view. This was done to solve some utf-8 problems we had on Linux. If you want to redirect python errors from internal python code (e.g. Draft) then the easiest is to add a further menu item to the sub-menu "Options" of the context-menu of the report view and add a slot to implement the exchange. For further infos have a look to ReportOutput::contextMenuEvent(). Just follow the example of "onToggleLogging". Let's say the new slot is onToggleRedirectPython() then look at PythonConsole::runSource() how the redirection is achieved. |
|
|
Perfect! Thanks for the info, will save me a lot of time |
|
|
Sorry Yorik for implementing this feature but dvdjimmy needs it now for better script debugging with print statements. Done in 4414 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-03-16 20:02 | yorik | New Issue | |
| 2011-03-16 20:02 | yorik | Status | new => assigned |
| 2011-03-16 20:02 | yorik | Assigned To | => yorik |
| 2011-03-30 09:03 | wmayer | Note Added: 0000758 | |
| 2011-03-30 11:59 | yorik | Note Added: 0000761 | |
| 2011-04-15 06:43 | wmayer | Note Added: 0000788 | |
| 2011-04-15 06:43 | wmayer | Status | assigned => closed |
| 2011-04-15 06:43 | wmayer | Resolution | open => fixed |
| 2011-04-15 06:43 | wmayer | Fixed in Version | => 0.12 |
FreeCAD