Is there any portable way for a Python process to request a load on its CPU?
If the ps command exists, I can run it and analyze the results, but this is less desirable.
you can use psutil :
import os import psutil pid = os.getpid() p = psutil.Process(pid) pct = p.get_cpu_percent(interval=1.0) print(pct)
Guppy / Heapy may be useful to you, but there are version problems, and it may not do everything you need.