Wrappers

Decorators and wrappers used throughout GloMPO.

glompo.common.wrappers.catch_user_interrupt(func)[source]

Catches a KeyboardInterrupt signal and exits gracefully.

glompo.common.wrappers.decorate_all_methods(decorator)[source]

Applies decorator to every method in a class.

glompo.common.wrappers.needs_optional_package(package: str)[source]

Checks package requirement before running a function. Will warn and not allow a function to execute if the package it requires is not available to the system. Applied to functions which provide optional GloMPO functionality.

glompo.common.wrappers.process_print_redirect(opt_id, working_dir, func)[source]

Redirects a process’ output to a text file in a designated directory.