General utilities on top of Python standard libraries
Project description
General utilities on top of Python standard libraries.
Examples for process-related utilities:
from utils.process import run, silent_run
run('ls -l')
out = run(['ls', '-l'], return_output=True)
# Just runs without any output to stdout. Alias for: run(..., silent=True)
silent_run('ls -l')
Examples for filesystem-related utilities:
from utils.fs import in_dir, in_temp_dir
with in_temp_dir() as tmpdir:
assert os.getcwd() == tmpdir
with in_dir('/tmp'):
assert os.getcwd() == '/tmp'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
utils-core-0.0.2.tar.gz
(5.3 kB
view details)
File details
Details for the file utils-core-0.0.2.tar.gz
.
File metadata
- Download URL: utils-core-0.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4480246fa96bb1f0b0159bf00d1d81d111fa8dae2e1c5e930cd6adf3b47787b4 |
|
MD5 | 55c0a9849b00838534b5aabeb2216fef |
|
BLAKE2b-256 | eef0758c3114f5e1cad8b878380c5360675d29371e5f4ce061e6025b300400b6 |