GRASS Programmer's Manual
6.4.2(2012)
|
Create and manage output console for commands run by GUI. More...
Public Member Functions | |
def | __init__ |
def | MakeSearchPaneContent |
Create search pane. | |
def | OnSearchPaneChanged |
Collapse search module box. | |
def | GetPanel |
Get panel. | |
def | Redirect |
Redirect stdout/stderr. | |
def | WriteLog |
Generic method for writing log message in given style. | |
def | WriteCmdLog |
Write message in selected style. | |
def | WriteWarning |
Write message in warning style. | |
def | WriteError |
Write message in error style. | |
def | RunCmd |
Run command typed into console command prompt (GPrompt). | |
def | ClearHistory |
Clear history of commands. | |
def | GetProgressBar |
Return progress bar widget. | |
def | GetLog |
Get widget used for logging. | |
def | SaveHistory |
Save history of commands. | |
def | GetCmd |
Get running command or None. | |
def | SetCopyingOfSelectedText |
Enable or disable copying of selected text in to clipboard. | |
def | OnUpdateStatusBar |
Update statusbar text. | |
def | OnCmdOutput |
Print command output. | |
def | OnCmdProgress |
Update progress message info. | |
def | OnCmdAbort |
Abort running command. | |
def | OnCmdRun |
Run command. | |
def | OnCmdDone |
Command done (or aborted) | |
def | OnProcessPendingOutputWindowEvents |
Create and manage output console for commands run by GUI.
Definition at line 171 of file goutput.py.
def gui_modules.goutput.GMConsole.__init__ | ( | self, | |
parent, | |||
id = wx.ID_ANY , |
|||
margin = False , |
|||
notebook = None , |
|||
style = wx.TAB_TRAVERSAL | wx.FULL_REPAINT_ON_RESIZE , |
|||
kwargs | |||
) |
Definition at line 177 of file goutput.py.
References gui_modules.render.Layer.SetName(), and gui_modules.gmodeler.ModelRelation.SetName().
def gui_modules.goutput.GMConsole.ClearHistory | ( | self, | |
event | |||
) |
Clear history of commands.
Definition at line 593 of file goutput.py.
def gui_modules.goutput.GMConsole.GetCmd | ( | self | ) |
Get running command or None.
Definition at line 640 of file goutput.py.
Referenced by gui_modules.render.Layer.__del__(), and gui_modules.render.Layer.SetCmd().
def gui_modules.goutput.GMConsole.GetLog | ( | self, | |
err = False |
|||
) |
Get widget used for logging.
err | True to get stderr widget |
Definition at line 604 of file goutput.py.
References gui_modules.goutput.GMConsole.cmd_stderr, and gui_modules.goutput.GMConsole.cmd_stdout.
def gui_modules.goutput.GMConsole.GetPanel | ( | self, | |
prompt = True |
|||
) |
Get panel.
prompt | get prompt / output panel |
Definition at line 347 of file goutput.py.
References gui_modules.goutput.GMConsole.panelOutput, and gui_modules.goutput.GMConsole.panelPrompt.
def gui_modules.goutput.GMConsole.GetProgressBar | ( | self | ) |
Return progress bar widget.
Definition at line 600 of file goutput.py.
References gui_modules.goutput.GMConsole.console_progressbar.
def gui_modules.goutput.GMConsole.MakeSearchPaneContent | ( | self, | |
pane | |||
) |
Create search pane.
Definition at line 325 of file goutput.py.
References gui_modules.goutput.GMConsole.cmd_prompt, gui_modules.gmodeler.ModelSearchDialog.cmd_prompt, gui_modules.ghelp.SearchModuleWindow.search, gui_modules.goutput.GMConsole.search, gui_modules.ghelp.MenuTreeWindow.search, gui_modules.ghelp.InstallExtensionWindow.search, and gui_modules.gmodeler.ModelSearchDialog.search.
def gui_modules.goutput.GMConsole.OnCmdAbort | ( | self, | |
event | |||
) |
Abort running command.
Definition at line 734 of file goutput.py.
def gui_modules.goutput.GMConsole.OnCmdDone | ( | self, | |
event | |||
) |
Command done (or aborted)
Definition at line 746 of file goutput.py.
References gui_modules.render.map, gui_modules.goutput.GMConsole.Redirect(), gui_modules.goutput.GMConsole.WriteCmdLog(), and gui_modules.goutput.GMConsole.WriteLog().
def gui_modules.goutput.GMConsole.OnCmdOutput | ( | self, | |
event | |||
) |
Print command output.
Definition at line 667 of file goutput.py.
References gui_modules.goutput.GMConsole.linepos.
def gui_modules.goutput.GMConsole.OnCmdProgress | ( | self, | |
event | |||
) |
Update progress message info.
Definition at line 730 of file goutput.py.
def gui_modules.goutput.GMConsole.OnCmdRun | ( | self, | |
event | |||
) |
Run command.
Definition at line 738 of file goutput.py.
References gui_modules.goutput.GMConsole.WriteCmdLog().
def gui_modules.goutput.GMConsole.OnProcessPendingOutputWindowEvents | ( | self, | |
event | |||
) |
Definition at line 879 of file goutput.py.
def gui_modules.goutput.GMConsole.OnSearchPaneChanged | ( | self, | |
event | |||
) |
Collapse search module box.
Definition at line 337 of file goutput.py.
References gui_modules.goutput.GMConsole.infoCollapseLabelCol, and gui_modules.goutput.GMConsole.infoCollapseLabelExp.
def gui_modules.goutput.GMConsole.OnUpdateStatusBar | ( | self, | |
event | |||
) |
Update statusbar text.
Definition at line 657 of file goutput.py.
Referenced by gui_modules.prompt.GPromptPopUp.__init__(), and gui_modules.prompt.GPrompt.OnRunCmd().
def gui_modules.goutput.GMConsole.Redirect | ( | self | ) |
Redirect stdout/stderr.
Definition at line 359 of file goutput.py.
References gui_modules.goutput.GMConsole.cmd_stderr, gui_modules.goutput.GMConsole.cmd_stdout, and gui_modules.goutput.GMConsole.WriteLog().
Referenced by gui_modules.goutput.GMConsole.OnCmdDone().
def gui_modules.goutput.GMConsole.RunCmd | ( | self, | |
command, | |||
compReg = True , |
|||
switchPage = False , |
|||
onDone = None |
|||
) |
Run command typed into console command prompt (GPrompt).
command | command given as a list (produced e.g. by utils.split()) |
compReg | True use computation region |
switchPage | switch to output page |
onDone | function to be called when command is finished |
Definition at line 428 of file goutput.py.
References gui_modules.goutput.GMConsole.cmd_stderr, gui_modules.goutput.GMConsole.cmd_stdout, gui_modules.psmap.OnAddLegend(), gui_modules.colorrules.ColorTable.parent, gui_modules.dbm_dialogs.DisplayAttributesDialog.parent, gui_modules.dbm.Log.parent, gui_modules.goutput.CmdThread.parent, gui_modules.dbm.VirtualAttributeList.parent, gui_modules.gcpmapdisp.MapFrame.parent, gui_modules.gcpmanager.GCPWizard.parent, gui_modules.goutput.GMConsole.parent, gui_modules.ghelp.MenuTreeWindow.parent, gui_modules.gcpmanager.LocationPage.parent, gui_modules.gcpmanager.GroupPage.parent, gui_modules.ghelp.MenuTree.parent, gui_modules.gdialogs.DecorationDialog.parent, gui_modules.dbm.AttributeManager.parent, gui_modules.gcpmanager.DispMapPage.parent, gui_modules.gmodeler.ModelFrame.parent, gui_modules.gdialogs.TextLayerDialog.parent, gui_modules.colorrules.BufferedWindow.parent, gui_modules.gcpmanager.GCP.parent, gui_modules.ghelp.InstallExtensionWindow.parent, gui_modules.gdialogs.AddMapLayersDialog.parent, gui_modules.ghelp.ExtensionTree.parent, gui_modules.gdialogs.ImportDialog.parent, gui_modules.ghelp.UninstallExtensionWindow.parent, gui_modules.ghelp.CheckListExtension.parent, gui_modules.ghelp.HelpWindow.parent, gui_modules.gdialogs.LayersList.parent, gui_modules.gdialogs.SetOpacityDialog.parent, gui_modules.gmodeler.ModelCanvas.parent, gui_modules.gdialogs.StaticWrapText.parent, gui_modules.gmodeler.ModelAction.parent, gui_modules.gdialogs.ImageSizeDialog.parent, gui_modules.gmodeler.ModelData.parent, gui_modules.gmodeler.ModelDataDialog.parent, gui_modules.dbm.TableListCtrl.parent, gui_modules.dbm.LayerListCtrl.parent, gui_modules.dbm.LayerBook.parent, gui_modules.gcpmanager.GrSettingsDialog.parent, gui_modules.gmodeler.ModelSearchDialog.parent, gui_modules.gmodeler.ModelRelation.parent, gui_modules.gmodeler.ModelRelationDialog.parent, gui_modules.gmodeler.ModelParamDialog.parent, gui_modules.gmodeler.ModelListCtrl.parent, gui_modules.gmodeler.VariablePanel.parent, gui_modules.gmodeler.ModelItem.parent, gui_modules.gmodeler.ModelItemDialog.parent, gui_modules.gmodeler.ItemPanel.parent, gui_modules.gmodeler.ItemCheckListCtrl.parent, and gui_modules.goutput.GMConsole.WriteError().
Referenced by gui_modules.goutput.GMConsole.WriteError().
def gui_modules.goutput.GMConsole.SaveHistory | ( | self, | |
event | |||
) |
Save history of commands.
Definition at line 614 of file goutput.py.
def gui_modules.goutput.GMConsole.SetCopyingOfSelectedText | ( | self, | |
copy | |||
) |
Enable or disable copying of selected text in to clipboard.
Effects prompt and output.
copy | True for enable, False for disable |
Definition at line 644 of file goutput.py.
def gui_modules.goutput.GMConsole.WriteCmdLog | ( | self, | |
line, | |||
pid = None , |
|||
switchPage = True |
|||
) |
Write message in selected style.
Definition at line 413 of file goutput.py.
References gui_modules.goutput.GMConsole.WriteLog().
Referenced by gui_modules.goutput.GMConsole.OnCmdDone(), and gui_modules.goutput.GMConsole.OnCmdRun().
def gui_modules.goutput.GMConsole.WriteError | ( | self, | |
line | |||
) |
Write message in error style.
Definition at line 423 of file goutput.py.
References gui_modules.goutput.GMConsole.RunCmd(), and gui_modules.goutput.GMConsole.WriteLog().
Referenced by gui_modules.goutput.GMConsole.RunCmd().
def gui_modules.goutput.GMConsole.WriteLog | ( | self, | |
text, | |||
style = None , |
|||
wrap = None , |
|||
switchPage = False |
|||
) |
Generic method for writing log message in given style.
line | text line |
style | text style (see GMStc) |
stdout | write to stdout or stderr |
Definition at line 376 of file goutput.py.
References gui_modules.goutput.GMConsole.lineWidth.
Referenced by gui_modules.goutput.GMConsole.OnCmdDone(), gui_modules.goutput.GMConsole.Redirect(), gui_modules.goutput.GMConsole.WriteCmdLog(), gui_modules.goutput.GMConsole.WriteError(), and gui_modules.goutput.GMConsole.WriteWarning().
def gui_modules.goutput.GMConsole.WriteWarning | ( | self, | |
line | |||
) |
Write message in warning style.
Definition at line 419 of file goutput.py.
References gui_modules.goutput.GMConsole.WriteLog().
gui_modules.goutput.GMConsole.btn_abort |
Definition at line 261 of file goutput.py.
gui_modules.goutput.GMConsole.btn_cmd_clear |
Definition at line 254 of file goutput.py.
gui_modules.goutput.GMConsole.btn_console_clear |
Definition at line 252 of file goutput.py.
gui_modules.goutput.GMConsole.btn_console_save |
Definition at line 258 of file goutput.py.
gui_modules.goutput.GMConsole.cmd_output |
Definition at line 212 of file goutput.py.
gui_modules.goutput.GMConsole.cmd_output_timer |
Definition at line 214 of file goutput.py.
gui_modules.goutput.GMConsole.cmd_prompt |
Definition at line 221 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.MakeSearchPaneContent().
gui_modules.goutput.GMConsole.cmd_stderr |
Definition at line 242 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.GetLog(), gui_modules.goutput.GMConsole.Redirect(), and gui_modules.goutput.GMConsole.RunCmd().
gui_modules.goutput.GMConsole.cmd_stdout |
Definition at line 241 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.GetLog(), gui_modules.goutput.GMConsole.Redirect(), and gui_modules.goutput.GMConsole.RunCmd().
gui_modules.goutput.GMConsole.cmdThread |
Definition at line 247 of file goutput.py.
gui_modules.goutput.GMConsole.console_progressbar |
Definition at line 204 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.GetProgressBar().
gui_modules.goutput.GMConsole.history |
Definition at line 616 of file goutput.py.
gui_modules.goutput.GMConsole.infoCollapseLabelCol |
Definition at line 228 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.OnSearchPaneChanged(), and gui_modules.location_wizard.RegionDef.OnSettings3DPaneChanged().
gui_modules.goutput.GMConsole.infoCollapseLabelExp |
Definition at line 227 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.OnSearchPaneChanged(), and gui_modules.location_wizard.RegionDef.OnSettings3DPaneChanged().
gui_modules.goutput.GMConsole.linePos |
Definition at line 193 of file goutput.py.
gui_modules.goutput.GMConsole.linepos |
Definition at line 689 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.OnCmdOutput().
gui_modules.goutput.GMConsole.lineWidth |
Definition at line 190 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.WriteLog().
gui_modules.goutput.GMConsole.panelOutput |
Definition at line 181 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.GetPanel().
gui_modules.goutput.GMConsole.panelPrompt |
Definition at line 182 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.GetPanel().
gui_modules.goutput.GMConsole.parent |
Definition at line 185 of file goutput.py.
Referenced by gui_modules.wxvdigit.VDigitError.Database(), gui_modules.wxvdigit.VDigitError.DbExecute(), gui_modules.wxvdigit.VDigitError.DbLink(), gui_modules.wxvdigit.VDigitError.DeadLine(), gui_modules.wxvdigit.VDigitError.Driver(), gui_modules.wxvdigit.VDigitError.FeatureType(), gui_modules.wxvdigit.VDigitError.NoMap(), gui_modules.menuform.mainFrame.OnCancel(), gui_modules.menuform.mainFrame.OnDone(), wxgui.GMFrame.OnPsMap(), gui_modules.menuform.mainFrame.OnRun(), gui_modules.toolbars.VDigitToolbar.OnSelectMap(), gui_modules.gselect.GdalSelect.OnSetDsn(), gui_modules.toolbars.VDigitToolbar.OnSettings(), gui_modules.toolbars.NvizToolbar.OnSettings(), gui_modules.toolbars.AbstractToolbar.OnTool(), gui_modules.menuform.cmdPanel.OnUpdateSelection(), gui_modules.toolbars.VDigitToolbar.OnZBulk(), gui_modules.wxvdigit.VDigitError.ReadLine(), gui_modules.menuform.UpdateQThread.run(), gui_modules.goutput.GMConsole.RunCmd(), gui_modules.toolbars.VDigitToolbar.StopEditing(), gui_modules.mapdisp_window.BufferedWindow.UpdateMap(), and gui_modules.wxvdigit.VDigitError.WriteLine().
gui_modules.goutput.GMConsole.requestQ |
Definition at line 198 of file goutput.py.
gui_modules.goutput.GMConsole.resultQ |
Definition at line 199 of file goutput.py.
gui_modules.goutput.GMConsole.search |
Definition at line 224 of file goutput.py.
Referenced by gui_modules.goutput.GMConsole.MakeSearchPaneContent().
gui_modules.goutput.GMConsole.searchPane |
Definition at line 229 of file goutput.py.