When a file is double clicked in a file manager it is automatically opened using the application associated with the type of the file.
How can I do the same from code. I am open to any programming language. I have a little experience with Python and C.
My target operating systems are Ubuntu Linux and OSX. However, ideally I would like to find a solution that works with Windows, OSX, and Ubuntu linux.