parallelprocs
Run commands via GNU Parallel or something like it.
Synopsis
$ cat test.py
#!/usr/bin/env python
from parallelprocs import run
try:
run(['echo foo', 'echo bar', 'echo baz'], verbose=True)
except Exception as e:
print(e)
$ ./test.py
Running job (# jobs = 3)
bar
baz
foo
Description
The module exposes a single function run that takes the following arguments:
Required Arguments:
commands [str]: commands
Keyword Options
- parallel (str): path to "parallel", default "which('parallel')"
- num_procs (int): num of concurrent processes, default "0" to use all CPUs
- verbose (bool): print messages to sys.stderr, default "False"
- halt (int): number of failed jobs to trigger halt, default "0" for no halt
Author
Ken Youens-Clark kyclark@gmail.com
Release files for parallelprocs 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parallelprocs-0.1.5.tar.gz | 2.6 kB | Details |
Release files / parallelprocs-0.1.5.tar.gz
| Download URL | parallelprocs-0.1.5.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16055d1373ec723c74f60f035da1316f3af4107ececafe440e4fdacae0d54d0e
|
|
BLAKE2b-256 checksum How to use checksums |
0a4dc687ab5e35dfba80ef404520186a358ae0cce58cd5612f1597c77e35cfa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|