Several articles show how to read data from a linux /proc/xxx file, such as: How can I parse the output of /proc/net/dev into key:value pairs per interface using Python?
How do I set up a Python application to create and write to my own /proc/mystats file so other processes can monitor it?
You can’t.
/proc/is a special filesystem for exposing information the kernel knows about various processes, it’s managed by the kernel.If you want to write running information to a file, use a different directory — for example, firefox writes stuff into
$HOME/.mozilla