Communication between python script and Arduino sketch
One option is to use spacebrew. This is a cloud-based service, however you can run your own server which is based on node.js, so it should work on the Yun.

Your Arduino can then send or receive data using yunSpacebrew, and you can connect it to python using pySpacebrew. This is a pure python library, so it ought to run fine on the Yun.