GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gcmd.Command Class Reference

Run command in separate thread. More...

Public Member Functions

def __init__

Data Fields


Detailed Description

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.

1 cmd = Command(cmd=['d.rast', 'elevation.dem'], verbose=3, wait=True)
3 if cmd.returncode == None:
4  print 'RUNNING?'
5 elif cmd.returncode == 0:
6  print 'SUCCESS'
7 else:
8  print 'FAILURE (%d)' % cmd.returncode
cmdcommand given as list
stdinstandard input stream
verboseverbose level [0, 3] (–q, –v)
waitwait for child execution terminated
rerrerror handling (when CmdError raised). True for redirection to stderr, False for GUI dialog, None for no operation (quiet mode)
stdoutredirect standard output or None
stderrredirect standard error output or None

Definition at line 305 of file

Constructor & Destructor Documentation

def gcmd.Command.__init__ (   self,
  stdin = None,
  verbose = None,
  wait = True,
  rerr = False,
  stdout = None,
  stderr = None 

Definition at line 335 of file

Field Documentation


Definition at line 358 of file


Definition at line 366 of file


Definition at line 338 of file

The documentation for this class was generated from the following file: