title: Call a python method if an item in context menu is clicked
body: <p>I have a "running" python application and I want it to perform an action on a file when q user right clicks the file and chooses a context menu item. For example, if the user right clicks and chooses "Do something", I want to call the following function in my python code: "do_something_on(file_path)".</p>
  
  <p>A half-baked solution that I have in mind is to run the code as a service and let it listen for events. Then on right click, I would run a small script that would send a message to the listener. Is there an approach that lets me call the function directly? Without going to the trouble of creating a service, etc?</p>