Communicate between Processing and Python (need help)

Hi, I’m doing a project using Kinect V1, it detects a tomato in a tree.
I’m new in Processing.
So I got coordinates data (x, y and z in 3D) of tomato but it switch very fast and was not stable at all. What commands or algorithms that I should use to get 1 stable data in a minute?
I need to send that coordinate to Python, so which is the best and easiest library I should use?
Thank you all!