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 hashes)