GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Create and manage output console for commands run by GUI. More...
Public Member Functions | |
def | __init__ |
def | MakeSearchPaneContent |
Create search pane. More... | |
def | OnSearchPaneChanged |
Collapse search module box. More... | |
def | GetPanel |
Get panel. More... | |
def | Redirect |
Redirect stdout/stderr. More... | |
def | WriteLog |
Generic method for writing log message in given style. More... | |
def | WriteCmdLog |
Write message in selected style. More... | |
def | WriteWarning |
Write message in warning style. More... | |
def | WriteError |
Write message in error style. More... | |
def | RunCmd |
Run command typed into console command prompt (GPrompt). More... | |
def | OnOutputClear |
Clear content of output window. More... | |
def | GetProgressBar |
Return progress bar widget. More... | |
def | GetLog |
Get widget used for logging. More... | |
def | OnOutputSave |
Save (selected) text from output window to the file. More... | |
def | GetCmd |
Get running command or None. More... | |
def | SetCopyingOfSelectedText |
Enable or disable copying of selected text in to clipboard. More... | |
def | OnUpdateStatusBar |
Update statusbar text. More... | |
def | OnCmdOutput |
Print command output. More... | |
def | OnCmdProgress |
Update progress message info. More... | |
def | CmdProtocolSave |
def | OnCmdProtocol |
Save commands into file. More... | |
def | OnCmdAbort |
Abort running command. More... | |
def | OnCmdRun |
Run command. More... | |
def | OnCmdPrepare |
Prepare for running command. More... | |
def | OnCmdDone |
Command done (or aborted) More... | |
def | OnProcessPendingOutputWindowEvents |
def | ResetFocus |
Reset focus. More... | |
def | GetPrompt |
Get prompt. More... | |
Create and manage output console for commands run by GUI.
Definition at line 183 of file goutput.py.
def 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 189 of file goutput.py.
References render.Layer.SetName(), and model.ModelRelation.SetName().
def goutput.GMConsole.CmdProtocolSave | ( | self | ) |
Save list of manually entered commands into a text log file
Definition at line 778 of file goutput.py.
References goutput.GMConsole.cmdFileProtocol.
Referenced by goutput.GMConsole.OnCmdProtocol().
def goutput.GMConsole.GetCmd | ( | self | ) |
Get running command or None.
Definition at line 684 of file goutput.py.
Referenced by wxnviz.ImageTexture.Corresponds().
def goutput.GMConsole.GetLog | ( | self, | |
err = False |
|||
) |
Get widget used for logging.
err | True to get stderr widget |
Definition at line 638 of file goutput.py.
References goutput.GMConsole.cmdStdErr, and goutput.GMConsole.cmdStdOut.
def goutput.GMConsole.GetPanel | ( | self, | |
prompt = True |
|||
) |
Get panel.
prompt | get prompt / output panel |
Definition at line 376 of file goutput.py.
References goutput.GMConsole.panelOutput, and goutput.GMConsole.panelPrompt.
def goutput.GMConsole.GetProgressBar | ( | self | ) |
Return progress bar widget.
Definition at line 634 of file goutput.py.
References goutput.GMConsole.progressbar.
Referenced by mapdisplay.MapFrame.OnUpdateProgress(), and frame.MapFrame.OnUpdateProgress().
def goutput.GMConsole.GetPrompt | ( | self | ) |
Get prompt.
Definition at line 993 of file goutput.py.
References ghelp.SearchModuleWindow.cmdPrompt, and goutput.GMConsole.cmdPrompt.
def goutput.GMConsole.MakeSearchPaneContent | ( | self, | |
pane | |||
) |
Create search pane.
Definition at line 354 of file goutput.py.
References ghelp.SearchModuleWindow.cmdPrompt, goutput.GMConsole.cmdPrompt, ghelp.SearchModuleWindow.search, dialogs.ModelSearchDialog.search, and goutput.GMConsole.search.
def goutput.GMConsole.OnCmdAbort | ( | self, | |
event | |||
) |
Abort running command.
Definition at line 822 of file goutput.py.
def goutput.GMConsole.OnCmdDone | ( | self, | |
event | |||
) |
Command done (or aborted)
Definition at line 841 of file goutput.py.
References utils.GetLayerNameFromCmd(), goutput.GMConsole.Redirect(), goutput.GMConsole.WriteCmdLog(), and goutput.GMConsole.WriteLog().
def goutput.GMConsole.OnCmdOutput | ( | self, | |
event | |||
) |
Print command output.
Definition at line 711 of file goutput.py.
References goutput.GMConsole.linePos.
def goutput.GMConsole.OnCmdPrepare | ( | self, | |
event | |||
) |
Prepare for running command.
Definition at line 834 of file goutput.py.
def goutput.GMConsole.OnCmdProgress | ( | self, | |
event | |||
) |
Update progress message info.
Definition at line 774 of file goutput.py.
def goutput.GMConsole.OnCmdProtocol | ( | self, | |
event = None |
|||
) |
Save commands into file.
Definition at line 798 of file goutput.py.
References goutput.GMConsole.CmdProtocolSave().
def goutput.GMConsole.OnCmdRun | ( | self, | |
event | |||
) |
def goutput.GMConsole.OnOutputClear | ( | self, | |
event | |||
) |
Clear content of output window.
Definition at line 627 of file goutput.py.
def goutput.GMConsole.OnOutputSave | ( | self, | |
event | |||
) |
Save (selected) text from output window to the file.
Definition at line 648 of file goutput.py.
References sqlbuilder.SQLFrame.parent, dialogs.ModelDataDialog.parent, dialogs.DisplayAttributesDialog.parent, manager.Log.parent, frame.ModelFrame.parent, goutput.CmdThread.parent, manager.VirtualAttributeList.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, forms.UpdateThread.parent, goutput.GMConsole.parent, dialogs.ModelRelationDialog.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, ghelp.HelpWindow.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, dialogs.ItemCheckListCtrl.parent, frame.ModelCanvas.parent, model.ModelData.parent, dialogs.MapLayersDialog.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, dialogs.ImportDialog.parent, frame.PythonPanel.parent, forms.GUI.parent, dialogs.LayersList.parent, dialogs.SetOpacityDialog.parent, dialogs.ImageSizeDialog.parent, model.ModelParamDialog.parent, manager.TableListCtrl.parent, manager.LayerListCtrl.parent, manager.GrSettingsDialog.parent, and manager.LayerBook.parent.
def goutput.GMConsole.OnProcessPendingOutputWindowEvents | ( | self, | |
event | |||
) |
Definition at line 986 of file goutput.py.
def goutput.GMConsole.OnSearchPaneChanged | ( | self, | |
event | |||
) |
Collapse search module box.
Definition at line 366 of file goutput.py.
References goutput.GMConsole.infoCollapseLabelCol, and goutput.GMConsole.infoCollapseLabelExp.
def goutput.GMConsole.OnUpdateStatusBar | ( | self, | |
event | |||
) |
Update statusbar text.
Definition at line 701 of file goutput.py.
Referenced by prompt.GPromptPopUp.__init__().
def goutput.GMConsole.Redirect | ( | self | ) |
Redirect stdout/stderr.
Definition at line 388 of file goutput.py.
References goutput.GMConsole.cmdStdErr, goutput.GMConsole.cmdStdOut, and goutput.GMConsole.WriteLog().
Referenced by goutput.GMConsole.OnCmdDone().
def goutput.GMConsole.ResetFocus | ( | self | ) |
Reset focus.
Definition at line 989 of file goutput.py.
def goutput.GMConsole.RunCmd | ( | self, | |
command, | |||
compReg = True , |
|||
switchPage = False , |
|||
skipInterface = False , |
|||
onDone = None , |
|||
onPrepare = None , |
|||
userData = 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 |
skipInterface | True to do not launch GRASS interface parser when command has no arguments given |
onDone | function to be called when command is finished |
onPrepare | function to be called before command is launched |
userData | data defined for the command |
Definition at line 458 of file goutput.py.
References goutput.GMConsole.cmdStdErr, goutput.GMConsole.cmdStdOut, utils.GetLayerNameFromCmd(), sqlbuilder.SQLFrame.parent, dialogs.ModelDataDialog.parent, dialogs.DisplayAttributesDialog.parent, manager.Log.parent, frame.ModelFrame.parent, goutput.CmdThread.parent, manager.VirtualAttributeList.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, forms.UpdateThread.parent, goutput.GMConsole.parent, dialogs.ModelRelationDialog.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, ghelp.HelpWindow.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, dialogs.ItemCheckListCtrl.parent, frame.ModelCanvas.parent, model.ModelData.parent, dialogs.MapLayersDialog.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, dialogs.ImportDialog.parent, frame.PythonPanel.parent, forms.GUI.parent, dialogs.LayersList.parent, dialogs.SetOpacityDialog.parent, dialogs.ImageSizeDialog.parent, model.ModelParamDialog.parent, manager.TableListCtrl.parent, manager.LayerListCtrl.parent, manager.GrSettingsDialog.parent, and manager.LayerBook.parent.
Referenced by goutput.GMConsole.WriteError().
def 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 688 of file goutput.py.
def goutput.GMConsole.WriteCmdLog | ( | self, | |
line, | |||
pid = None , |
|||
switchPage = True |
|||
) |
Write message in selected style.
Definition at line 442 of file goutput.py.
References goutput.GMConsole.WriteLog().
Referenced by goutput.GMConsole.OnCmdDone(), and goutput.GMConsole.OnCmdRun().
def goutput.GMConsole.WriteError | ( | self, | |
line | |||
) |
Write message in error style.
Definition at line 453 of file goutput.py.
References goutput.GMConsole.RunCmd(), and goutput.GMConsole.WriteLog().
def 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 405 of file goutput.py.
References goutput.GMConsole.lineWidth.
Referenced by goutput.GMConsole.OnCmdDone(), goutput.GMConsole.Redirect(), goutput.GMConsole.WriteCmdLog(), goutput.GMConsole.WriteError(), and goutput.GMConsole.WriteWarning().
def goutput.GMConsole.WriteWarning | ( | self, | |
line | |||
) |
Write message in warning style.
Definition at line 449 of file goutput.py.
References goutput.GMConsole.WriteLog().
goutput.GMConsole.btnCmdAbort |
Definition at line 264 of file goutput.py.
goutput.GMConsole.btnCmdClear |
Definition at line 260 of file goutput.py.
goutput.GMConsole.btnCmdProtocol |
Definition at line 267 of file goutput.py.
goutput.GMConsole.btnOutputClear |
Definition at line 258 of file goutput.py.
goutput.GMConsole.btnOutputSave |
Definition at line 262 of file goutput.py.
goutput.GMConsole.cmdBox |
Definition at line 254 of file goutput.py.
goutput.GMConsole.cmdFileProtocol |
Definition at line 814 of file goutput.py.
Referenced by goutput.GMConsole.CmdProtocolSave().
goutput.GMConsole.cmdOutput |
Definition at line 218 of file goutput.py.
goutput.GMConsole.cmdOutputTimer |
Definition at line 220 of file goutput.py.
goutput.GMConsole.cmdPrompt |
Definition at line 228 of file goutput.py.
Referenced by goutput.GMConsole.GetPrompt(), and goutput.GMConsole.MakeSearchPaneContent().
goutput.GMConsole.cmdStdErr |
Definition at line 247 of file goutput.py.
Referenced by goutput.GMConsole.GetLog(), goutput.GMConsole.Redirect(), and goutput.GMConsole.RunCmd().
goutput.GMConsole.cmdStdOut |
Definition at line 246 of file goutput.py.
Referenced by goutput.GMConsole.GetLog(), goutput.GMConsole.Redirect(), and goutput.GMConsole.RunCmd().
goutput.GMConsole.cmdThread |
Definition at line 250 of file goutput.py.
goutput.GMConsole.infoCollapseLabelCol |
Definition at line 235 of file goutput.py.
Referenced by goutput.GMConsole.OnSearchPaneChanged(), and dialogs.RegionDef.OnSettings3DPaneChanged().
goutput.GMConsole.infoCollapseLabelExp |
Definition at line 234 of file goutput.py.
Referenced by goutput.GMConsole.OnSearchPaneChanged(), and dialogs.RegionDef.OnSettings3DPaneChanged().
goutput.GMConsole.linePos |
Definition at line 205 of file goutput.py.
Referenced by goutput.GMConsole.OnCmdOutput().
goutput.GMConsole.lineWidth |
Definition at line 202 of file goutput.py.
Referenced by goutput.GMConsole.WriteLog().
goutput.GMConsole.outputBox |
Definition at line 252 of file goutput.py.
goutput.GMConsole.panelOutput |
Definition at line 193 of file goutput.py.
Referenced by goutput.GMConsole.GetPanel().
goutput.GMConsole.panelPrompt |
Definition at line 194 of file goutput.py.
Referenced by goutput.GMConsole.GetPanel().
goutput.GMConsole.parent |
Definition at line 197 of file goutput.py.
Referenced by wxdigit.VDigitError.Database(), wxdigit.VDigitError.DbExecute(), wxdigit.VDigitError.DbLink(), wxdigit.VDigitError.DeadLine(), wxdigit.VDigitError.Driver(), wxdigit.VDigitError.FeatureType(), colorrules.RulesPanel.LoadRules(), wxdigit.VDigitError.NoMap(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), frame.PsMapBufferedWindow.OnLeftUp(), goutput.GMConsole.OnOutputSave(), toolbars.VDigitToolbar.OnSelectMap(), gselect.GdalSelect.OnSetDsn(), toolbars.LMNvizToolbar.OnSettings(), toolbars.VDigitToolbar.OnSettings(), toolbars.BaseToolbar.OnTool(), toolbars.VDigitToolbar.OnZBulk(), wxdigit.VDigitError.ReadLine(), goutput.GMConsole.RunCmd(), toolbars.VDigitToolbar.StopEditing(), colorrules.VectorColorTable.UpdateColorColumn(), mapwindow.BufferedWindow.UpdateMap(), and wxdigit.VDigitError.WriteLine().
goutput.GMConsole.progressbar |
Definition at line 212 of file goutput.py.
Referenced by statusbar.SbManager.GetProgressBar(), goutput.GMConsole.GetProgressBar(), and mapwindow.NvizThread.run().
goutput.GMConsole.requestQ |
Definition at line 208 of file goutput.py.
goutput.GMConsole.resultQ |
Definition at line 209 of file goutput.py.
goutput.GMConsole.search |
Definition at line 231 of file goutput.py.
Referenced by goutput.GMConsole.MakeSearchPaneContent().
goutput.GMConsole.searchPane |
Definition at line 236 of file goutput.py.