GRASS Programmer's Manual
6.4.2(2012)
|
Run command in separate thread. More...
Public Member Functions | |
def | __init__ |
Data Fields | |
cmd | |
stderr | |
cmdThread | |
returncode |
Run command in separate thread.
Used for commands launched on the background.
If stdout/err is redirected, write() method is required for the given classes.
cmd = Command(cmd=['d.rast', 'elevation.dem'], verbose=3, wait=True) if cmd.returncode == None: print 'RUNNING?' elif cmd.returncode == 0: print 'SUCCESS' else: print 'FAILURE (%d)' % cmd.returncode
cmd | command given as list |
stdin | standard input stream |
verbose | verbose level [0, 3] (--q, --v) |
wait | wait for child execution terminated |
rerr | error handling (when CmdError raised). True for redirection to stderr, False for GUI dialog, None for no operation (quiet mode) |
stdout | redirect standard output or None |
stderr | redirect standard error output or None |
def gui_modules.gcmd.Command.__init__ | ( | self, | |
cmd, | |||
stdin = None , |
|||
verbose = None , |
|||
wait = True , |
|||
rerr = False , |
|||
stdout = None , |
|||
stderr = None |
|||
) |
Definition at line 299 of file gcmd.py.
Referenced by gui_modules.render.Layer::GetCmd(), gui_modules.menuform.GUI::GetCmd(), gui_modules.vclean.VectorCleaningFrame::OnCopy(), gui_modules.vclean.VectorCleaningFrame::OnHelp(), gui_modules.mcalc_builder.MapCalcFrame::OnHelp(), gui_modules.mcalc_builder.MapCalcFrame::OnMCalcRun(), gui_modules.gdialogs.DecorationDialog::OnOptions(), gui_modules.render.Layer::Render(), and gui_modules.render.Layer::SetCmd().