I\'m looking for a fast and lightweight way to read system uptime from a Python script. Is there a way to call the sysinfo Linux system call from Python?
sysinfo
What about:
import subprocess print(subprocess.check_output(['cat', '/proc/uptime']).decode('utf-8').split()[0])
Not the fastest way but simple and direct