1

I am using a python script that runs in a curses wrapper loop. I would like to have a conky display show the values of various str vars in the script, updating every second. I know i could have the python script write data to a text file and have conky read the file, but that seems inefficient and unscalable. What are some ways to do this without text files? I imagine using sockets or pipes and a helper script called from conky like this

${exec "helper.py --get-variable=var_a"}

I havent found much on how to do this. I am on manjaro linux. What is the best way?

Christopher Brown
  • 537
  • 1
  • 5
  • 14
  • After imagining, start to put the image into some form of reality, and if that doesn't do what you want, post code here. –  Jan 03 '21 at 15:27
  • I think having your script write values to a file is probably the easiest solution, and not any less efficient than a complicated contraption built from pipes and sockets. – larsks Jan 03 '21 at 17:20
  • If your file is in a tmpfs filesystem like `/run` or `/tmp`, it will be pretty efficient. – meuh Jan 03 '21 at 18:35
  • 1
    Yes, I tried and it works pretty well, with the advantage of simplicity. – Christopher Brown Jan 26 '21 at 16:15

0 Answers0