#### PyKDE - Python Bindings for KDE

# class KProcess

Table of contents
Modules
kdecore Classes
All Classes

Module | kdecore
Class | KProcess
Inherits | QObject

### enums

- (anonymous) = {PrioLowest, PrioLow, PrioLower, PrioNormal, PrioHigher, PrioHigh, PrioHighest }
- Communication = {NoCommunication, Stdin, Stdout, Stderr, AllOutput, All, NoRead, CTtyOnly, MergedStderr }
- Communication = {NoCommunication, Stdin, Stdout, Stderr, AllOutput, All, NoRead }
- RunMode = {DontCare, NotifyOnExit, Block, OwnGroup }
- RunMode = {DontCare, NotifyOnExit, Block }

### methods

- KProcess (parent, name = 0)

  returns a KProcess instance
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  parent | QObject |
  name | char | 0

- KProcess ()

  returns a KProcess instance

- KProcess (a0)

  returns a KProcess instance
  In versions less than KDE 3.2.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KProcess |

- args ()

  returns (QValueList<QCString>)

- childError (fdno)

  returns (int)

  Argument | Type | Default
  --- | --- | ---
  fdno | int |

- childOutput (fdno)

  returns (int)

  Argument | Type | Default
  --- | --- | ---
  fdno | int |

- clearArguments ()

  returns nothing

- closeAll ()

  returns nothing
  In versions KDE 3.2.0 and above only

- closePty ()

  returns (bool)
  In versions KDE 3.2.0 and above only

- closeStderr ()

  returns (bool)

- closeStdin ()

  returns (bool)

- closeStdout ()

  returns (bool)

- commClose ()

  returns nothing

- commSetupDoneC ()

  returns (int)

- commSetupDoneP ()

  returns (int)

- coreDumped ()

  returns (bool)
  In versions KDE 3.2.0 and above only

- detach ()

  returns nothing

- exitSignal ()

  returns (int)
  In versions KDE 3.2.0 and above only

- exitStatus ()

  returns (int)

- getPid ()

  returns (pid_t)

- isRunning ()

  returns (bool)

- kill (signo = SIGTERM)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  signo | int | SIGTERM

- normalExit ()

  returns (bool)

- pid ()

  returns (pid_t)

- processExited (proc)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  proc | KProcess |

- processHasExited (state)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  state | int |

- pty ()

  returns (KPty)
  In versions KDE 3.2.0 and above, but less than KDE 3.4.0

- quote (arg)

  returns (QString)
  In versions KDE 3.1.0 and above only
  static

  Argument | Type | Default
  --- | --- | ---
  arg | QString |

- receivedStderr (proc, buffer, buflen)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  proc | KProcess |
  buffer | char |
  buflen | int |

- receivedStdout (proc, buffer, buflen)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  proc | KProcess |
  buffer | char |
  buflen | int |

- receivedStdout (fd)

  Not Implemented

- resume ()

  returns nothing

- runPrivileged ()

  returns (bool)

- setArguments (arglist)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  arglist | a Python list of strings |

  setArguments is the PyKDE equivalent of the stream operator methods (<<) in KDE's KProcess class - provide with a list of strings representing the arguments to the executable program set with setExecutable (PyKDE will continue to provide setExecutable even though it's deprecated in KDE (to also be replaced with stream operators)

- setBinaryExecutable (filename)

  returns nothing
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  filename | char |

- setEnvironment (name, value)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  value | QString |

- setExecutable (proc)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  proc | QString |

- setPriority (prio)

  returns (bool)
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  prio | int |

- setRunPrivileged (keepPrivileges)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  keepPrivileges | bool |

- setUsePty (a0, a1)

  returns nothing
  In versions KDE 3.2.0 and above, but less than KDE 3.4.0

  Argument | Type | Default
  --- | --- | ---
  a0 | KProcess.Communication |
  a1 | bool |

- setUseShell (useShell, shell = 0)

  returns nothing
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  useShell | bool |
  shell | char | 0

- setWorkingDirectory (dir)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  dir | QString |

- setupCommunication (comm)

  returns (int)

  Argument | Type | Default
  --- | --- | ---
  comm | KProcess.Communication |

- setupEnvironment ()

  returns nothing

- signalled ()

  returns (bool)
  In versions KDE 3.2.0 and above only

- slotChildError (fdno)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  fdno | int |

- slotChildOutput (fdno)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  fdno | int |

- slotSendData (dummy)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  dummy | int |

- start (runmode = NotifyOnExit, comm = NoCommunication)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  runmode | KProcess.RunMode | NotifyOnExit
  comm | KProcess.Communication | NoCommunication

- suspend ()

  returns nothing

- wait (timeout = -1)

  returns (bool)
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  timeout | int | -1

- writeStdin (buffer, buflen)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  buffer | char |
  buflen | int |

- wroteStdin (proc)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  proc | KProcess |

## operators

- operator << (a0)

  returns (KProcess)
  In versions KDE 3.1.4 and above only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- operator << (a0)

  returns (KProcess)
  In versions KDE 3.1.4 and above only

  Argument | Type | Default
  --- | --- | ---
  a0 | char |

- operator << (a0)

  returns (KProcess)
  In versions KDE 3.1.4 and above only

  Argument | Type | Default
  --- | --- | ---
  a0 | QCString |

- operator << (a0)

  returns (KProcess)
  In versions KDE 3.1.4 and above only

  Argument | Type | Default
  --- | --- | ---
  a0 | QStringList |