PyMOTW: resource – System resource management

The functions in resource help you probe the current resources consumed by a process, and place limits on them to control how much load your program places on a system.

Read more at pymotw.com: resource