Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

oVirt/cpopen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# CPopen

> IMPORTANT: This project has been dropped from oVirt.
>
> Keeping the following section only for reference.

A C reimplementation of the tricky bits of Python's Popen.

It is currently implemented in a very specific way and might break under
general use.

NOTE: This object can be replaced by subprocess32 in python2.7. subprocess32
package covers all required fix that already part of python3 and we have in
cpopen. cpopen adds more options such as deathSignal, but those are not
standard in popen interface anyway.

# TODO

* Support string invocation - Currently only support array invocation
* Support after fork func
* Support all stream modes - Currently everything has to be PIPE

# Usage

```{.python}
import cpopen
proc = cpopen.CPopen(["echo", "3"])
proc.communicate()
```

# Running the tests

```{.bash}
nosetests tests/tests.py
```