Skip to main content
Help us improve Python packaging – donate today!

A popen wrapper.

Project Description


# processy

### Description

*Processy* is a wrapper around `Popen` similar to the now built-in `subprocess.run()` function, which was added in Python3.5. Prior to 3.5 there was no simple sane function to run subprocesses. This is why I made *processy*. The current implementation of `subprocess.run()` still won't let you print and return stdout at the same time. *Processy* remains useful for that.

### `processy.run()`
```python
def run(
cmd: Union[list, str],
verbose: bool = True,
return_stdout: bool = False,
raise_err: bool = False,
**popen_kwargs
) -> CompletedProcess:
"""
@cmd: The Popen command. If it's a string shlex is used to split it.
@return_stdout: Returns the output from stdout.
@verbose: Print the output to stdout if True. If False call runs quite.
@raise_error: If subprocess return code is not 0.
"""
# ...
```

### `CompletedProcess`

Since Python3.5 *processy* uses the return object `CompletedProcess` that was added to the subprocess module. It's almost identical to processy's old `ProcResult` object.'

```python
CompletedProcess(
args: Union[str, list]
returncode: int
stdout: Optiona[Union[str, bytes]]
stderr: Optiona[Union[str, bytes]]
)
```

Release history Release notifications

This version
History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.0.0a5

History Node

0.0.0a4

History Node

0.0.0a1

History Node

0.0.0a0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
processy-1.0.7-py3-none-any.whl (4.2 kB) Copy SHA256 hash SHA256 Wheel 3.6 Feb 12, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page