package documentation

Utilities for os/shell scripting

From __init__.py:

Exception Error Undocumented
Exception TimeoutError Undocumented
Function abs_path Absolutize a relative path with respect to a base directory or file path
Function abs_web_path Return an absolute path in a base dir and ensure the path is correct.
Function chown Undocumented
Function file_age Undocumented
Function file_checksum Undocumented
Function file_mtime Undocumented
Function file_size Undocumented
Function find_files Undocumented
Function getenv Undocumented
Function kill_pid Undocumented
Function parse_path Parse a path into a dict(path,dirname,filename,name,extension)
Function process_rss_size Undocumented
Function rel_path Relativize an absolute path with respect to a base directory or file path
Function rename Undocumented
Function run Run a process, return a tuple (rc, output)
Function run_nowait Run a process and return immediately
Function running_pids Undocumented
Function unlink Undocumented
Function utime Undocumented
Variable _Path Undocumented
def getenv(key: str, default: str = None) -> t.Optional[str]: (source)

Undocumented

def utime(): (source)

Undocumented

def run_nowait(cmd, **kwargs): (source)

Run a process and return immediately

def run(cmd, input=None, echo=False, strict=True, timeout=None, **kwargs): (source)

Run a process, return a tuple (rc, output)

def unlink(path): (source)

Undocumented

def rename(src, dst): (source)

Undocumented

def chown(path, user=None, group=None): (source)

Undocumented

def file_mtime(path): (source)

Undocumented

def file_age(path): (source)

Undocumented

def file_size(path): (source)

Undocumented

def file_checksum(path): (source)

Undocumented

def kill_pid(pid, sig_name='TERM'): (source)

Undocumented

def running_pids() -> dict[int, str]: (source)

Undocumented

def process_rss_size(unit='m') -> float: (source)

Undocumented

def find_files(dirname, pattern=None, ext=None, deep=True): (source)

Undocumented

Undocumented

def parse_path(path: _Path) -> dict[str, str]: (source)

Parse a path into a dict(path,dirname,filename,name,extension)

def abs_path(path: _Path, base: str) -> str: (source)

Absolutize a relative path with respect to a base directory or file path

def abs_web_path(path: str, basedir: str) -> t.Optional[str]: (source)

Return an absolute path in a base dir and ensure the path is correct.

def rel_path(path: _Path, base: str) -> str: (source)

Relativize an absolute path with respect to a base directory or file path