Skip to content

General utilities on top of Python standard libraries

License

Notifications You must be signed in to change notification settings

maxzheng/utils-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

utils-core

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:

import os

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'

Links & Contact Info

About

General utilities on top of Python standard libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages