'How to make windows create associations with certain filetypes when developing in python

I am making an mp3 player and in Windows, usually applications are launched depending on file type which I call file association. For example MP3 files are automatically associated to open in groove. How can I make this happen for applications I make in python. Is this an operating system setting or variable that assigns these?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source