I created a file mymime.xml
<?xml version='1.0' encoding='utf-8'?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/myapp">
<comment>my format</comment>
<glob pattern="*.myformat"/>
</mime-type>
</mime-info>
and a file myapp.desktop
[Desktop Entry]
Name=MyApp
GenericName=My Generic Name
Comment=a comment
Exec=myapp
Icon=myicon
Terminal=false
Type=Application
Categories=Development;
MimeType=text/myapp;
Name[en_US]=MyApp
Now when I right click on a file that has myformat ending, it suggests opening with MyApp, which is the behavior I was looking! But on the python3 code (I am using PyQt5), how do I take the loading argument when there is a file loaded like this? (right click open or double click on a file.myformat)