Ooooo, great question.
Really looking forward to see what the hive mind can come up with on this one…
Off the top of my head, I have three ideas.
-
Node-RED. If you are running it, then it would be dead simple to have a PAC Node to listen for a variable and an Exec Node to call the function.py.
Just hooking those two nodes together should just about do it, but you might need a RBE or Function Node between them to sort out the msg.payload. -
FTP. The PAC Controller has a sweet set of FTP commands and so does every Linux distro known to planet Earth.
So, the PAC Controller shoots a dummy.txt file to the FTP server on the Linux PC.
The Linux PC has a cron job that every second (or five) looks for dummy.txt and when it sees it, deletes it and calls function.py. -
The hard way.
Run Apache and have it listen for an incoming connection from the PAC Controller and then have some PHP call the function.py.
A very rough outline about this method can be found here; Plot a graph from MySQL data